Hello. I would also like to point out that the position of the ToTensor() transforms in the transform list is important. When using transforms, be careful to use Resize() or other transforms before the ToTensor().
Maybe it’s a beginner mistake but I spent 12 hours trying to figure out what was wrong with my code