From 6085dcbc1be0b8e0f7f53d1933be81f3fa70a4e0 Mon Sep 17 00:00:00 2001 From: Michael Suo Date: Fri, 6 Sep 2019 14:34:38 -0700 Subject: [PATCH] asdf --- test/test_fake_quant.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_fake_quant.py b/test/test_fake_quant.py index b8d8dbb5dba1..26917808f23b 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