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

Method test_value

tests/transforms/test_vote_ensemble.py:75–80  ·  view source on GitHub ↗
(self, input_param, img, expected_value)

Source from the content-addressed store, hash-verified

73class TestVoteEnsemble(unittest.TestCase):
74 @parameterized.expand(TESTS)
75 def test_value(self, input_param, img, expected_value):
76 result = VoteEnsemble(**input_param)(img)
77 if isinstance(img, torch.Tensor):
78 self.assertIsInstance(result, torch.Tensor)
79 self.assertEqual(result.device, img.device)
80 assert_allclose(result, expected_value)
81
82
83if __name__ == "__main__":

Callers

nothing calls this directly

Calls 2

VoteEnsembleClass · 0.90
assert_allcloseFunction · 0.90

Tested by

no test coverage detected