(self, input_param, input_shape, expected_shape)
| 76 | class TestAutoEncoder(unittest.TestCase): |
| 77 | @parameterized.expand(CASES) |
| 78 | def test_shape(self, input_param, input_shape, expected_shape): |
| 79 | net = AutoEncoder(**input_param).to(device) |
| 80 | with eval_mode(net): |
| 81 | result = net.forward(torch.randn(input_shape).to(device)) |
| 82 | self.assertEqual(result.shape, expected_shape) |
| 83 | |
| 84 | def test_script(self): |
| 85 | net = AutoEncoder(spatial_dims=2, in_channels=1, out_channels=1, channels=(4, 8), strides=(2, 2)) |
nothing calls this directly
no test coverage detected