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

Method test_shape

tests/networks/blocks/test_segresnet_block.py:40–44  ·  view source on GitHub ↗
(self, input_param, input_shape, expected_shape)

Source from the content-addressed store, hash-verified

38class TestResBlock(unittest.TestCase):
39 @parameterized.expand(TEST_CASE_RESBLOCK)
40 def test_shape(self, input_param, input_shape, expected_shape):
41 net = ResBlock(**input_param)
42 with eval_mode(net):
43 result = net(torch.randn(input_shape))
44 self.assertEqual(result.shape, expected_shape)
45
46 def test_ill_arg(self):
47 with self.assertRaises(AssertionError):

Callers

nothing calls this directly

Calls 2

ResBlockClass · 0.90
eval_modeFunction · 0.90

Tested by

no test coverage detected