diff --git a/test/test_fake_quant.py b/test/test_fake_quant.py index b8d8dbb5dba1e..26917808f23b7 100644 --- a/test/test_fake_quant.py +++ b/test/test_fake_quant.py @@ -10,7 +10,7 @@ # Reference method for quantizing a tensor. def _fake_quantize_per_tensor_affine_reference(X, scale, zero_point, num_bits): quant_min, quant_max = 0, 2 ** num_bits - 1 - res = (np.clip(np.round(X / scale) + zero_point, quant_min, quant_max) - zero_point) * scale + res = (np.clip(np.round(X / scale)+zero_point, quant_min, quant_max) - zero_point) * scale res = res.reshape(X.shape) return res