Preferred way to freeze a backbone, train for several steps, unfreeze the backbone, and continue training on all parameters. #19996
Unanswered
isaacgerg
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I see a lot of forum posts about freezing a backbone, training for several steps, then unfreezing the backbone, then continjue training. However, many posts seem to be missing steps (I believe) to account for batchnorm, dropout, etc. I am also confused about .freeze() and .eval() -- what are the differences and when should you use each?
To make this discussion concrete, below is an example pseudocode with my current understanding how to do this. In the example below, I train with a frozen backbone for 10 epochs and then train the entire network for the remaining 90 epochs . Is the pseudocode
correct?
Beta Was this translation helpful? Give feedback.
All reactions