(self)
| 193 | test_script_save(net, test_data) |
| 194 | |
| 195 | def test_ill_input_shape(self): |
| 196 | net = UNet(spatial_dims=2, in_channels=1, out_channels=3, channels=(16, 32, 64), strides=(2, 2)) |
| 197 | with eval_mode(net): |
| 198 | with self.assertRaisesRegex(RuntimeError, "Sizes of tensors must match"): |
| 199 | net.forward(torch.randn(2, 1, 16, 5)) |
| 200 | |
| 201 | @parameterized.expand(ILL_CASES) |
| 202 | def test_ill_input_hyper_params(self, input_param): |