Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MegEngine/MegEngine
/ quant
Function
quant
imperative/python/test/unit/quantization/test_module.py:44–46 ·
view source on GitHub ↗
(x, scale)
Source
from the content-addressed store, hash-verified
42
43
44
def
quant(x, scale):
45
inp_dtype = dtype.qint8(scale)
46
return
x.astype(inp_dtype)
47
48
49
def
fake_quant(x, scale, qmin, qmax):
Callers
5
test_dequant_stub
Function · 0.70
test_elemwise
Function · 0.70
test_linear
Function · 0.70
test_conv
Function · 0.70
test_concat
Function · 0.70
Calls
1
astype
Method · 0.45
Tested by
no test coverage detected