fix tolerance maybe
@@ -75,9 +75,9 @@ class TestOps(unittest.TestCase):
def test_mish(self):
def _mish_pytorch(x):
return x*torch.tanh(torch.nn.functional.softplus(x))
- helper_test_op([(45,65)], _mish_pytorch, Tensor.mish)
+ helper_test_op([(45,65)], _mish_pytorch, Tensor.mish, atol=1e-4)
def test_dot(self):
- helper_test_op([(45,65), (65,100)], lambda x,y: x.matmul(y), Tensor.dot)
+ helper_test_op([(45,65), (65,100)], lambda x,y: x.matmul(y), Tensor.dot, atol=1e-4)
def test_multidot(self):
helper_test_op([(10,45,65), (10,65,45)], lambda x,y: x @ y, Tensor.dot, atol=1e-4)
helper_test_op([(3,3,45,65), (3,3,65,45)], lambda x,y: x @ y, Tensor.dot, atol=1e-4)
