MCPcopy 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
13def quant(x, scale):
14 x_dtype = dtype.qint8(scale)
15 return x.astype(x_dtype)
16
17
18def fake_quant(x, scale):

Callers 1

test_elemwiseFunction · 0.70

Calls 1

astypeMethod · 0.45

Tested by

no test coverage detected