This repository was archived by the owner on Jul 1, 2024. It is now read-only.
Support freezing model anywhere in fine tuning#728
Open
lauragustafson wants to merge 1 commit intofacebookresearch:mainfrom
Open
Support freezing model anywhere in fine tuning#728lauragustafson wants to merge 1 commit intofacebookresearch:mainfrom
lauragustafson wants to merge 1 commit intofacebookresearch:mainfrom
Conversation
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`. - Adds documentation for fine tuning task Differential Revision: D27199092 fbshipit-source-id: b12dc00563da45806317f60e2abbcc4237bec94c
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D27199092 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_untilto specify what point to freeze the model to. Options areheador 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