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

Method test_shape

tests/networks/nets/test_highresnet.py:52–56  ·  view source on GitHub ↗
(self, input_param, input_shape, expected_shape)

Source from the content-addressed store, hash-verified

50class TestHighResNet(DistTestCase):
51 @parameterized.expand([TEST_CASE_1, TEST_CASE_2, TEST_CASE_3, TEST_CASE_4])
52 def test_shape(self, input_param, input_shape, expected_shape):
53 net = HighResNet(**input_param).to(device)
54 with eval_mode(net):
55 result = net.forward(torch.randn(input_shape).to(device))
56 self.assertEqual(result.shape, expected_shape)
57
58 @TimedCall(seconds=800, force_quit=True)
59 def test_script(self):

Callers

nothing calls this directly

Calls 3

HighResNetClass · 0.90
eval_modeFunction · 0.90
forwardMethod · 0.45

Tested by

no test coverage detected