-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Fix ConvNext V2 parameter naming issue #23122
Fix ConvNext V2 parameter naming issue #23122
Conversation
The documentation is not available anymore as the PR was closed or merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing!
if "gamma" in name: | ||
name = name.replace("gamma", "weight") | ||
if "beta" in name: | ||
name = name.replace("beta", "bias") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to do it since from_pretrained
will do it anyway. But it doesn't hurt I guess 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah true, I renamed them differently at first and then switched to weight and bias to avoid updating the checkpoints
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing! 🔧
Fixes the parameter naming issue in ConvNextV2GRN module
Fixes the parameter naming issue in ConvNextV2GRN module
Fixes the parameter naming issue in ConvNextV2GRN module
What does this PR do?
Renames gamma and beta parameters of the
ConvNextV2GRN
module, which caused thesave_pretrained
method to rename these parameters to weight and bias.Existing checkpoints on the hub can be loaded without any warnings once the PR is merged.
Fixes #23090
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.