The transforms.ToPILImage is defined as follows:
Converts a torch.*Tensor of shape C x H x W or a numpy ndarray of shape H x W x C to a PIL Image while preserving the value range.
So I don’t think it will change the value range.
The  `mode`  of an image defines the type and depth of a pixel in the image

In my case, the data value range change. I don’t know why and I think it’s correlated to
transforms.ToTensor()

But I’m not sure