Solved by ptrblck in post #2 
              
              
                There is a small mistake in reassigning the last linear layer. 
In resnet50 the last linear layer is called self.fc instead of self.fc1. 
Even though you assigned a new layer to self.fc1, this layer wasn’t used and your model was basically a pretrained ResNet with 1000 output classes. 
Fix this typo…