Solved by ptrblck in post #10 
              
              
                I didn’t realize you are using your custom resnet implementation, which uses model.linear as the last linear layer, not fc. 
Try to change the code to model.module.linear = ... and it should work.