Commit 1398540e authored by Cjkkkk's avatar Cjkkkk Committed by chicm-ms
Browse files

fix unit test (#1785)

parent aa51e79c
......@@ -257,7 +257,7 @@ class CompressorTestCase(TestCase):
weight = torch.tensor([[-1, 2], [3, 5]]).float()
quantize_weight = quantizer.quantize_weight(weight, config_list[0], model.conv2)
assert math.isclose(model.conv2.scale, 6 / 255, abs_tol=eps)
assert model.conv2.zero_point == 42
assert model.conv2.zero_point in (42, 43)
# test ema
x = torch.tensor([[-0.2, 0], [0.1, 0.2]])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment