mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-04-07 03:00:26 -04:00
only float Tensors have gradient [pr] (#10475)
This commit is contained in:
@@ -494,7 +494,7 @@ class TestTinygrad(unittest.TestCase):
|
||||
_a = Tensor([3]) in [Tensor([3]), Tensor([4]), Tensor([5])]
|
||||
|
||||
def test_repr_with_grad(self):
|
||||
a = Tensor([1], requires_grad=True)
|
||||
a = Tensor([1.0], requires_grad=True)
|
||||
b = Tensor([1])
|
||||
c = (a + b).sum().backward()
|
||||
print(a)
|
||||
|
||||
Reference in New Issue
Block a user