skyunyoo:

The question in this part is that the max values of each data are different. Is it correct to set the range to [0,1] as each max rather than the max value of the entire data set?


It might be OK, if you apply the same preprocessing on the test set. However, you wouldn’t be able to use Normalize with the mean and std of the training set afterwards.



 skyunyoo:

Also, I saw that the data range should be normalized to [-1,1] through various posts.
However, when norm = transforms.Normalize([0.5], [0.5]),image = norm(image) is used, mean and std values of the entire image cannot be 0 and 1, respectively. Is it correct to apply this?


It comes down to your use case and what works better. The “standard” approach would be to standardize the data, i.e. such that it has a zero mean and unit variance.
However, you could also try to normalize the data to [-1, 1] and compare the results.