MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / test_shape

Method test_shape

tests/networks/nets/test_segresnet.py:70–74  ·  view source on GitHub ↗
(self, input_param, input_shape, expected_shape)

Source from the content-addressed store, hash-verified

68class 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):

Callers

nothing calls this directly

Calls 2

SegResNetClass · 0.90
eval_modeFunction · 0.90

Tested by

no test coverage detected