After converting a PIL or NumPy image using ToTensor, I usually see Normalize called. The arguments are usually tuples of 0.5 or the values calculated from ImageNet.


First question: If the input range is [0,1] then the output would be [-1,1], which I’ve read is good for training a network. So that must mean that ToTensor changes the range of the input from [0, 255] to [0,1]. Is that correct?


Second question is, why is [-1, 1] any better than [0, 1] when it comes to pixel value ranges?


Third question is when would I want to tweak the mean and standard deviation? For example, I am working on the style transfer exercise of Udacity’s intro to PyTorch class. I noticed that when they load a new image for style transfer, they use the mean and standard from ImageNet. Why was this choice made?