import torch def normPRED(d): ma = torch.max(d) mi = torch.min(d) dn = (d - mi) / (ma - mi) return dn