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: add scale_by_gradient_norm #958

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SauravMaheshkar
Copy link
Contributor

Reference: #594

This PR aims to add a new GradientTransformation which allows to scale by the gradient norm.

Request for Review: @fabianp

@SauravMaheshkar
Copy link
Contributor Author

CI is green again 😄

@SauravMaheshkar
Copy link
Contributor Author

Gentle ping: @fabianp

@fabianp
Copy link
Member

fabianp commented May 16, 2024

thanks for the ping, will look into this ASAP

@fabianp
Copy link
Member

fabianp commented May 31, 2024

Hi @SauravMaheshkar ,

a couple more comments after discussing this issue with the dev team:

  • let's promote this to the main package, since normalized GD is a fairly classical method :-)
  • we found the name scale_by_gradient_norm a bit misleading, as it's really scaled by the inverse of the gradient norm. A better name for the method would (IMO) be normalize_by_update_norm.

what do you think about these comments? do they sound reasonable?

@SauravMaheshkar
Copy link
Contributor Author

Hi @SauravMaheshkar ,

a couple more comments after discussing this issue with the dev team:

  • let's promote this to the main package, since normalized GD is a fairly classical method :-)
  • we found the name scale_by_gradient_norm a bit misleading, as it's really scaled by the inverse of the gradient norm. A better name for the method would (IMO) be normalize_by_update_norm.

what do you think about these comments? do they sound reasonable?

Hey @fabianp glad to know there's interest. That sounds reasonable.

Let me do some refactoring. Since it's going into main, I'll put some more effort in the docstrings as well. Will push soon 😄

@fabianp
Copy link
Member

fabianp commented Jun 1, 2024

amazing, thanks!

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.

None yet

2 participants