Hi,
If you don’t change the setting of the resnet50 from torchvision, then its weights will require gradients and so when you call .backward() on your loss, all the .grad field in the resnet will be populated and you can perform optimizer steps on it.