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

Method test_shape

tests/networks/blocks/test_CABlock.py:47–51  ·  view source on GitHub ↗
(self, input_param, input_shape)

Source from the content-addressed store, hash-verified

45class TestFeedForward(unittest.TestCase):
46 @parameterized.expand(TEST_CASES_FEEDFORWARD)
47 def test_shape(self, input_param, input_shape):
48 net = FeedForward(**input_param)
49 with eval_mode(net):
50 result = net(torch.randn(input_shape))
51 self.assertEqual(result.shape, input_shape)
52
53 def test_gating_mechanism(self):
54 net = FeedForward(spatial_dims=2, dim=32, ffn_expansion_factor=2.0, bias=True)

Callers

nothing calls this directly

Calls 2

FeedForwardClass · 0.90
eval_modeFunction · 0.90

Tested by

no test coverage detected