UserWarning: Das angegebene Numpy-Array ist nicht schriftlich, und Pytorch unterstützt keine nicht geschriebenen Tensoren.

# Instead of using 
# img = transforms.ToTensor()(img)

# Use this:
img = transforms.ToTensor()(np.array(img))
Eager Eel