fix dropout test

This commit is contained in:
George Hotz
2023-03-05 12:24:04 -08:00
parent 3072e098c0
commit 7940ad258e

View File

@@ -108,7 +108,7 @@ class TestTinygrad(unittest.TestCase):
w = Tensor.ones(n).dropout(rate)
non_zeros = np.count_nonzero(w.cpu().numpy())
expected = n * (1 - rate)
np.testing.assert_allclose(non_zeros, expected, rtol=1e-3)
np.testing.assert_allclose(non_zeros, expected, rtol=2e-3)
#@unittest.skipUnless(Device.DEFAULT == Device.CPU, "float64 not supported on GPU")
@unittest.skip("float64 support broken")