MCPcopy Create free account
hub / github.com/HealthX-Lab/MedCLIP-SAMv2 / normalize

Function normalize

saliency_maps/scripts/utils.py:12–13  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

10device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
11
12def normalize(x):
13 return (x - x.min()) / (x.max() - x.min())
14
15class mySequential(nn.Sequential):
16 def forward(self, *input, **kwargs):

Callers 2

text_heatmapMethod · 0.90
vision_heatmapMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected