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_op.py:13–15 ·
view source on GitHub ↗
(x, scale)
Source
from the content-addressed store, hash-verified
11
12
13
def
quant(x, scale):
14
x_dtype = dtype.qint8(scale)
15
return
x.astype(x_dtype)
16
17
18
def
fake_quant(x, scale):
Callers
1
test_elemwise
Function · 0.70
Calls
1
astype
Method · 0.45
Tested by
no test coverage detected