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

Method test_vae_shape

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

Source from the content-addressed store, hash-verified

87class TestResNetVAE(unittest.TestCase):
88 @parameterized.expand(TEST_CASE_SEGRESNET_VAE)
89 def test_vae_shape(self, input_param, input_shape, expected_shape):
90 net = SegResNetVAE(**input_param).to(device)
91 with eval_mode(net):
92 result, _ = net(torch.randn(input_shape).to(device))
93 self.assertEqual(result.shape, expected_shape)
94
95 def test_script(self):
96 input_param, input_shape, expected_shape = TEST_CASE_SEGRESNET_VAE[0]

Callers

nothing calls this directly

Calls 2

SegResNetVAEClass · 0.90
eval_modeFunction · 0.90

Tested by

no test coverage detected