MCPcopy 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
44def quant(x, scale):
45 inp_dtype = dtype.qint8(scale)
46 return x.astype(inp_dtype)
47
48
49def fake_quant(x, scale, qmin, qmax):

Callers 5

test_dequant_stubFunction · 0.70
test_elemwiseFunction · 0.70
test_linearFunction · 0.70
test_convFunction · 0.70
test_concatFunction · 0.70

Calls 1

astypeMethod · 0.45

Tested by

no test coverage detected