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

Function _compute

monai/visualize/class_activation_maps.py:40–42  ·  view source on GitHub ↗
(data: np.ndarray)

Source from the content-addressed store, hash-verified

38 """
39
40 def _compute(data: np.ndarray) -> np.ndarray:
41 scaler = ScaleIntensity(minv=1.0, maxv=0.0)
42 return np.stack([scaler(i) for i in data], axis=0)
43
44 if isinstance(x, torch.Tensor):
45 return torch.as_tensor(_compute(x.detach().cpu().numpy()), device=x.device) # type: ignore

Callers 2

__call__Method · 0.85
default_normalizerFunction · 0.85

Calls 1

ScaleIntensityClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…