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

Ranger sign inversion #232

Open
i404788 opened this issue Apr 24, 2024 · 1 comment
Open

Ranger sign inversion #232

i404788 opened this issue Apr 24, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@i404788
Copy link
Contributor

i404788 commented Apr 24, 2024

Describe the bug

From my experiments it seems like the sign for the Ranger is inverted. All other optimizers (including Ranger21) has steps in the opposite direction of Ranger.

Note that I'm testing context-free step directions/magnitudes using a 'perfect' gradient (scaled by 4), so if Ranger somehow reverts course when gradients from different directions are accumulated that would be missed from my test.
Hyperparameters: {'betas': (0.003344506587403595, 0.9685357345548955), 'lr': 0.4616639698903086} (found through hyperparameter search, also done for the other optimizers) and evaluated on the Ackley (dim=2) function.

(I didn't want to create a PR before discussing if this might be intended)

To Reproduce

  • OS : Linux
  • PyTorch version : 2
  • Python version : 3.11

Log

Ranger:
image

For comparison SGD:
image

@i404788 i404788 added the bug Something isn't working label Apr 24, 2024
@kozistr
Copy link
Owner

kozistr commented May 5, 2024

hi! sorry for the late reply

the current Ranger implementation in this repository is based on here.

(I might be wrong) I guess there's no big difference between the original implementation and mine. (let me know if I'm wrong)

could you please test with the original implementation and reproduce the same result?

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants