(self)
| 37 | np.testing.assert_equal(c.cpu().numpy(), [2,2,2,2]) |
| 38 | |
| 39 | def test_expand(self): |
| 40 | a = torch.Tensor([1,2,3,4]).to(device) |
| 41 | out = a.reshape(4,1).expand(4,4) |
| 42 | np.testing.assert_equal(out.cpu().numpy(), [[1,1,1,1],[2,2,2,2],[3,3,3,3],[4,4,4,4]]) |
| 43 | |
| 44 | def test_reshape(self): |
| 45 | a = torch.Tensor([[1,2],[3,4]]).to(device) |
nothing calls this directly
no test coverage detected