UserWarning: la matriz Numpy dada no es escritable, y Pytorch no admite tensores no escritos.

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

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