Yes freezing layers is a technique of training a model.  So i train the model for, lets say 5 epochs on the last 3 layers, then train further for 3 epochs for only the last 2 layers(freezing the thirds last layer) and so on…
And saving the model.state_dict() does not save the requires_grad attribute of the parameters of the model whearas saving the entire model does save it. Saving the entire model works as long as u are not changing the architecture of the model itself.
So, given that i have to freeze layers after a few epochs, do i have any option other than defining a new optimizer ?