remaining use of t.quantize_linear (#21219)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21219

att

Differential Revision: D15583802

fbshipit-source-id: 742e8b799d67485b2d48b1458839f3f3b000f200
This commit is contained in:
Jerry Zhang 2019-05-31 16:01:24 -07:00 committed by Facebook Github Bot
parent 4dbeb87e52
commit fd19d06db4

View File

@ -18,7 +18,7 @@ class FunctionalAPITest(TestCase):
Y = X.numpy().copy()
Y[Y < 0] = 0
qY = _quantize(Y, scale, zero_point)
qX = X.quantize_linear(scale=scale, zero_point=zero_point, dtype=torch.quint8)
qX = torch.quantize_linear(X, scale=scale, zero_point=zero_point, dtype=torch.quint8)
qY_hat = F.relu(qX)
np.testing.assert_equal(qY, qY_hat.int_repr())