MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / tqt_forward

Function tqt_forward

imperative/python/megengine/quantization/utils.py:32–35  ·  view source on GitHub ↗
(qmin, qmax, inp, scale)

Source from the content-addressed store, hash-verified

30
31
32def tqt_forward(qmin, qmax, inp, scale):
33 op = builtin.TQT(qmin=qmin, qmax=qmax)
34 (output,) = apply(op, inp, scale)
35 return output
36
37
38def lsq_forward(qmin, qmax, inp, step_size, zero_point=None, scale_grad=None):

Callers 4

test_tqtFunction · 0.90
testerFunction · 0.90
funcFunction · 0.90
fake_quant_forwardMethod · 0.85

Calls 1

applyFunction · 0.50

Tested by 3

test_tqtFunction · 0.72
testerFunction · 0.72
funcFunction · 0.72