Solved by ptrblck in post #11 
              
              
                I’ve checked another possibility and this is most likely the issue. 
In your normalization, you have an additional zero for the third channel, which results in the inf values: 
transforms.Normalize([0.485,0.456,0.406],[0.229,0.224,0,0.225])

Remove the zero and try it again.