Thanks man!
Worked perfectly.
In case anyone else comes across this issue:
    def renormalize(self, tensor):
        minFrom= tensor.min()
        maxFrom= tensor.max()
        minTo = 0
        maxTo=1
        return minTo + (maxTo - minTo) * ((tensor - minFrom) / (maxFrom - minFrom))

this code worked for me