Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
99
class
FakeQuantize(_FakeQuantize):
Callers
2
_apply_fakequant_with_observer
Method · 0.45
get_qparams
Function · 0.45
Calls
1
create_qparams
Function · 0.85
Tested by
1
get_qparams
Function · 0.36