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

Method __call__

monai/transforms/regularization/array.py:195–199  ·  view source on GitHub ↗
(self, data: torch.Tensor, randomize=True)

Source from the content-addressed store, hash-verified

193 return mask * data
194
195 def __call__(self, data: torch.Tensor, randomize=True):
196 data_t = convert_to_tensor(data, track_meta=get_track_meta())
197 if randomize:
198 self.randomize(data)
199 return convert_to_dst_type(self.apply(data_t), dst=data)[0]

Callers

nothing calls this directly

Calls 5

applyMethod · 0.95
convert_to_tensorFunction · 0.90
get_track_metaFunction · 0.90
convert_to_dst_typeFunction · 0.90
randomizeMethod · 0.45

Tested by

no test coverage detected