facebookresearch / ClassyVision

An end-to-end PyTorch framework for image and video classification
https://classyvision.ai
MIT License
1.59k stars 278 forks source link

Support freezing model anywhere in fine tuning #728

Open lauragustafson opened 3 years ago

lauragustafson commented 3 years ago

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

Differential Revision: D27199092

facebook-github-bot commented 3 years ago

This pull request was exported from Phabricator. Differential Revision: D27199092