Solved by ptrblck in post #2 
              
              
                Would you like to change the weights manually? 
If so, you could wrap the code in a torch.no_grad() guard: 
with torch.no_grad():
    model.fc.weight[0, 0] = 1.

to prevent Autograd from tracking these changes.