MCPcopy Create free account
hub / github.com/OpenGVLab/EfficientQAT / change_n_bits

Method change_n_bits

quantize/quantizer.py:53–56  ·  view source on GitHub ↗
(self, n_bits)

Source from the content-addressed store, hash-verified

51
52
53 def change_n_bits(self, n_bits):
54 self.n_bits = n_bits
55 self.qmin = 0
56 self.qmax = int(2 ** (n_bits) - 1)
57
58 def fake_quant(self, x):
59 scale = clamp_ste(self.scale,1e-4, 1e4)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected