MCPcopy Index your code
hub / github.com/Project-MONAI/MONAI / clone

Method clone

monai/data/meta_tensor.py:520–531  ·  view source on GitHub ↗

Returns a copy of the MetaTensor instance. Args: kwargs: additional keyword arguments to `torch.clone`. See also: https://pytorch.org/docs/stable/generated/torch.clone.html

(self, **kwargs)

Source from the content-addressed store, hash-verified

518 )
519
520 def clone(self, **kwargs):
521 """
522 Returns a copy of the MetaTensor instance.
523
524 Args:
525 kwargs: additional keyword arguments to `torch.clone`.
526
527 See also: https://pytorch.org/docs/stable/generated/torch.clone.html
528 """
529 new_inst = MetaTensor(self.as_tensor().clone(**kwargs))
530 new_inst.__dict__ = deepcopy(self.__dict__)
531 return new_inst
532
533 @staticmethod
534 def ensure_torch_and_prune_meta(

Callers 15

test_orntdMethod · 0.95
normalize_transformFunction · 0.80
copy_fromMethod · 0.80
copy_conv_paramFunction · 0.80
forwardMethod · 0.80
forwardMethod · 0.80
update_point_to_patchMethod · 0.80
forward_with_coordsMethod · 0.80
forwardMethod · 0.80
__init__Method · 0.80
get_bufferMethod · 0.80
get_currentMethod · 0.80

Calls 2

as_tensorMethod · 0.95
MetaTensorClass · 0.85