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

Method test_shape

tests/networks/nets/test_hovernet.py:158–164  ·  view source on GitHub ↗
(self, input_param, input_shape, expected_shapes)

Source from the content-addressed store, hash-verified

156class TestHoverNet(unittest.TestCase):
157 @parameterized.expand(CASES)
158 def test_shape(self, input_param, input_shape, expected_shapes):
159 input_param["decoder_padding"] = False
160 net = HoVerNet(**input_param).to(device)
161 with eval_mode(net):
162 result = net.forward(torch.randn(input_shape).to(device))
163 for item in result:
164 self.assertEqual(result[item].shape, expected_shapes[item])
165
166 @parameterized.expand(CASES)
167 def test_decoder_padding_shape(self, input_param, input_shape, expected_shapes):

Callers

nothing calls this directly

Calls 3

HoVerNetClass · 0.90
eval_modeFunction · 0.90
forwardMethod · 0.45

Tested by

no test coverage detected