(self)
| 83 | self.assertEqual(out.item(), 10.0) |
| 84 | |
| 85 | def test_multiple_ops(self): |
| 86 | a = Tensor([1.,2,3]) |
| 87 | b = Tensor([4.,5,6]) |
| 88 | out = (a + b) * (a - b) |
| 89 | out.callify() |
| 90 | self.assertListEqual(out.tolist(), [-15.0, -21.0, -27.0]) |
| 91 | |
| 92 | def test_double_callify(self): |
| 93 | a = Tensor([1.,2,3]) |