Do you see a constant loss or the same accuracy or what do you mean by “not training”?
The code looks alright, but could you make sure that the new linear layer is being updated by printing the gradients after calling loss.backward():
print(model.resnet.fc.weight.grad)