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

Method test_shape

tests/networks/nets/test_restormer.py:114–118  ·  view source on GitHub ↗
(self, spatial_dims, in_channels, embed_dim, input_shape, expected_shape)

Source from the content-addressed store, hash-verified

112
113 @parameterized.expand(TEST_CASES_PATCHEMBED)
114 def test_shape(self, spatial_dims, in_channels, embed_dim, input_shape, expected_shape):
115 net = OverlapPatchEmbed(spatial_dims=spatial_dims, in_channels=in_channels, embed_dim=embed_dim)
116 with eval_mode(net):
117 result = net(torch.randn(input_shape))
118 self.assertEqual(result.shape, expected_shape)
119
120
121class TestRestormer(unittest.TestCase):

Callers

nothing calls this directly

Calls 2

OverlapPatchEmbedClass · 0.90
eval_modeFunction · 0.90

Tested by

no test coverage detected