Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(utils): freeze module #1156

Merged
merged 4 commits into from
Mar 6, 2022

Conversation

FateScript
Copy link
Member

close #1105 , I add UT for adjust_status also.

Simple example code for users who want to freeze backbone.

class Exp(MyExp):
    ...
    def get_model(self):
        from yolox.utils import freeze_module
        model = super().get_model()
        freeze_module(model.backbone.backbone)
        # freeze_module(model.backbone)  # freeze FPN also
        return model

Plz review kindly. @GOATmessi7 @Joker316701882

Copy link
Member

@GOATmessi7 GOATmessi7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@FateScript FateScript merged commit 5bbfc11 into Megvii-BaseDetection:main Mar 6, 2022
@FateScript FateScript deleted the add_freeze branch April 14, 2022 03:15
Githubinme pushed a commit to Githubinme/YOLOX that referenced this pull request Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

how can i do transfer learning yolox
2 participants