Solved by ptrblck in post #2 
              
              
                Your explanation is right in general. 
Just some minor issues: 
In PyTorch, images are represented as [channels, height, width], so a color image would be [3, 256, 256]. 
During the training you will get batches of images, so your shape in the forward method will get an additional batch dimension at…