mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
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:
parent
4dbeb87e52
commit
fd19d06db4
|
|
@ -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())
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user