Summary:
Add support for freezing the model anywhere in the fine tuning task. Users can specify a specific module to freeze the model until in finetuning. Functionality is useful for situations, like the FixRes paper, where both the head and the last batch norm layer are trained during fine tuning.
Example fblearner run using freeze_until to freeze the trunk model: f259575699
Example fblearner run using freeze_until to unfreeze the last batchnorm and head:
f259575306
Adds new config option freeze_until to specify what point to freeze the model to. Options are head or the name of a module in the model. The model will be frozen until but not including that module and unfrozen at that point onwards. freeze_until: 'head' has the same functionality as freeze_trunk: true.
Summary: Add support for freezing the model anywhere in the fine tuning task. Users can specify a specific module to freeze the model until in finetuning. Functionality is useful for situations, like the FixRes paper, where both the head and the last batch norm layer are trained during fine tuning.
Example fblearner run using freeze_until to freeze the trunk model: f259575699 Example fblearner run using freeze_until to unfreeze the last batchnorm and head: f259575306
freeze_until
to specify what point to freeze the model to. Options arehead
or the name of a module in the model. The model will be frozen until but not including that module and unfrozen at that point onwards.freeze_until: 'head'
has the same functionality asfreeze_trunk: true
.Differential Revision: D27199092