A typical way to load image data is to:

Load the image from disk as a PIL Image with shape [C, W, H] and data of type uint8
convert it to type float/double and map it to values between 0…1
normalize it according to some mean and std. Generally, this means that the tensor contains negative values.

I’d like to visualize the normalized image. I could and would like to use the ToPILImage transformation.
However, AFAIK, this function requires the input tensor to be of type uint8.
Is there an ‘easy’ way to do this? or do I have to adjust the channels individually using its min/max?
Thanks