(self, device)
| 26 | class TestExample(unittest.TestCase): |
| 27 | @multidevice_test |
| 28 | def test_convert_to_cpu(self, device): |
| 29 | a = Tensor([[1,2],[3,4]], device=device) |
| 30 | assert a.numpy().shape == (2,2) |
| 31 | b = a.to("CPU") |
| 32 | assert b.numpy().shape == (2,2) |
| 33 | |
| 34 | @multidevice_test |
| 35 | def test_2_plus_3(self, device): |