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

Inplace bias correction #1

Closed
r1ckya opened this issue Aug 29, 2019 · 1 comment
Closed

Inplace bias correction #1

r1ckya opened this issue Aug 29, 2019 · 1 comment

Comments

@r1ckya
Copy link

r1ckya commented Aug 29, 2019

exp_avg.div_(bias_correction1)

Here bias correction is made inplace so it affects exp_avg in the next steps (bias correction accumulates). I wonder if that was intentional?
Original Adam doesn't accomulate bias correction, it is applied on each step to calculate momentums with hat.
image

@frgfm
Copy link
Owner

frgfm commented Aug 29, 2019

Agreed, this is a good catch!
Unfortunately, I just read your issue after spending hours looking for the issue and finding it a couple of minutes ago. I'll edit my commit to close this issue!
Thanks for pointing it out!

@frgfm frgfm closed this as completed in 928ac50 Aug 29, 2019
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

No branches or pull requests

2 participants