(self, img_shape)
| 40 | |
| 41 | @parameterized.expand(TEST_CASES) |
| 42 | def test_forward(self, img_shape): |
| 43 | n_dims = len(img_shape[1:]) |
| 44 | x = self.get_data(img_shape) |
| 45 | t = Fourier() |
| 46 | out = t.shift_fourier(x, n_dims) |
| 47 | |
| 48 | expect = torch.fft.fftshift(torch.fft.fftn(x, dim=tuple(range(-n_dims, 0))), dim=tuple(range(-n_dims, 0))) |
| 49 | |
| 50 | np.testing.assert_allclose(out, expect) |
| 51 | |
| 52 | @parameterized.expand(TEST_CASES) |
| 53 | def test_backward(self, img_shape): |
nothing calls this directly
no test coverage detected