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

Method test_shape

tests/networks/nets/test_segresnet_ds.py:67–71  ·  view source on GitHub ↗
(self, input_param, input_shape, expected_shape)

Source from the content-addressed store, hash-verified

65class TestSegResNetDS(unittest.TestCase):
66 @parameterized.expand(TEST_CASE_SEGRESNET_DS)
67 def test_shape(self, input_param, input_shape, expected_shape):
68 net = SegResNetDS(**input_param).to(device)
69 with eval_mode(net):
70 result = net(torch.randn(input_shape).to(device))
71 self.assertEqual(result.shape, expected_shape, msg=str(input_param))
72
73 @parameterized.expand(TEST_CASE_SEGRESNET_DS)
74 def test_shape_ds2(self, input_param, input_shape, expected_shape):

Callers

nothing calls this directly

Calls 2

SegResNetDSClass · 0.90
eval_modeFunction · 0.90

Tested by

no test coverage detected