score = model(input)
    score.clamp_(min=-1, max=1)
    score.add_(-(-1)).div_(1 - (-1) + 1e-5)
    image = score.cpu().squeeze(0) 
    image = torchvision.ToPILImage()(image)
    image.save('output.png')


Is this right?