Solved by ptrblck in post #2 
              
              
                It seems that img is a ByteTensor, which you are trying to normalize with floating point values. 
This simple code snippet will raise the same issue: 
img = torch.randint(0, 255, (3, 24, 24)).byte()
img.add_(torch.tensor(1.))

Try to transform img to a FloatTensor via img = img.float() before normal…