MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / get_qparams

Method get_qparams

imperative/python/megengine/quantization/fake_quant.py:95–96  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

93 self.scale[...] = F.log(qparams.scale) / math.log(2)
94
95 def get_qparams(self):
96 return create_qparams(QuantMode.SYMMERTIC, self.dtype, scale=2 ** self.scale)
97
98
99class FakeQuantize(_FakeQuantize):

Callers 2

get_qparamsFunction · 0.45

Calls 1

create_qparamsFunction · 0.85

Tested by 1

get_qparamsFunction · 0.36