Solved by Nikronic in post #2 
              
              
                Hi, 
The error is about the channel logic. numpy is channel last, pytorch is channel first, the error says you are using numpy logic for pytorch tensors. Instead of converting your PIL images to numpy then reading those arrays as tensor using from_numpy, you can directly convert the PIL image to pr…