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

Method test_out

tests/data/meta_tensor/test_meta_tensor.py:263–272  ·  view source on GitHub ↗

Test when `out` is given as an argument.

(self)

Source from the content-addressed store, hash-verified

261 self.check(im_conv2, im_conv, ids=False, rtol=1e-2, atol=1e-2)
262
263 def test_out(self):
264 """Test when `out` is given as an argument."""
265 m1, _ = self.get_im()
266 m2, _ = self.get_im()
267 m3, _ = self.get_im()
268 torch.add(m2, m3, out=m1)
269 m1_add = m2 + m3
270
271 assert_allclose(m1, m1_add)
272 # self.check_meta(m1, m2) # meta is from first input tensor
273
274 @parameterized.expand(TESTS)
275 def test_collate(self, device, dtype):

Callers

nothing calls this directly

Calls 3

get_imMethod · 0.95
assert_allcloseFunction · 0.90
addMethod · 0.80

Tested by

no test coverage detected