Thanks for the information.



 CarlosHernandezP:

mean: -3.287e-05 (isn’t it weird that it’s lower than the minimum?


The mean is not lower than the min (note the e-05), as it’s close to zero.
Based on the tensor stats I think you should normalize the tensor to have values in [0, 1], as otherwise you’ll lose information.
ToPILImage would call these lines of code 1:
        if pic.is_floating_point() and mode != 'F':
            pic = pic.mul(255).byte()

which will add the clipping.
Use:
x = torch.randn(3, 224, 224)
x = x - x.min()
x = x / x.max()

to squash the values into [0, 1] before plotting them. You would still lose some information, but it might not be that disastrous.