(self)
| 628 | np.testing.assert_equal(b.cpu().numpy(), expected.numpy()) |
| 629 | |
| 630 | def test_repeat_multidim(self): |
| 631 | a = torch.arange(6, dtype=torch.float32, device=device).reshape(2, 3) |
| 632 | b = a.repeat(2, 3) |
| 633 | expected = torch.arange(6, dtype=torch.float32).reshape(2, 3).repeat(2, 3) |
| 634 | np.testing.assert_equal(b.cpu().numpy(), expected.numpy()) |
| 635 | |
| 636 | def test_repeat_backward(self): |
| 637 | a = torch.tensor([[1.0, 2.0]], dtype=torch.float32, device=device, requires_grad=True) |
nothing calls this directly
no test coverage detected