(self, input_param, input_shape, expected_shape)
| 68 | class TestResNet(unittest.TestCase): |
| 69 | @parameterized.expand(TEST_CASE_SEGRESNET + TEST_CASE_SEGRESNET_2) |
| 70 | def test_shape(self, input_param, input_shape, expected_shape): |
| 71 | net = SegResNet(**input_param).to(device) |
| 72 | with eval_mode(net): |
| 73 | result = net(torch.randn(input_shape).to(device)) |
| 74 | self.assertEqual(result.shape, expected_shape) |
| 75 | |
| 76 | def test_ill_arg(self): |
| 77 | with self.assertRaises(ValueError): |