Looking at the ToTensor implementation, we can see that it converts to the float dtype after scaling. So if a float type tensor appears here or elsewhere in the pipeline, it is usually expected to have already been scaled. You can change the method used to load the images or just add the scaling yourself (there’s no strong reason it has to be in ToTensor)