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

Function init_qat_net

imperative/python/test/unit/quantization/test_module.py:62–68  ·  view source on GitHub ↗
(net)

Source from the content-addressed store, hash-verified

60
61
62def init_qat_net(net):
63 if net.with_weight:
64 net.weight_observer.min_val[...] = Tensor(min_val[0])
65 net.weight_observer.max_val[...] = Tensor(max_val[0])
66 if net.with_act:
67 net.act_observer.min_val[...] = Tensor(min_val[1])
68 net.act_observer.max_val[...] = Tensor(max_val[1])
69
70
71def test_quant_stub():

Callers 6

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

Calls 1

TensorClass · 0.90

Tested by

no test coverage detected