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

Fix ADAMW, and track the loss #46

Closed
wants to merge 2 commits into from
Closed

Conversation

mcabbott
Copy link
Member

This makes the same changes as FluxML/Flux.jl#1612, xref #38.

It also alters the tests to keep track of the loss. Although it does not fix any of the convergence problems.

@@ -405,7 +405,7 @@ weight decay regularization.
(no need to change default)
"""
ADAMW(η = 1f-3, β = (9f-1, 9.99f-1), γ = 0, ϵ = eps(typeof(η))) =
OptimiserChain(ADAM{typeof(η)}(η, β, ϵ), WeightDecay))
OptimiserChain(ADAM{typeof(η)}(1, β, ϵ), WeightDecay{typeof(η)}(γ), Descent(η))
Copy link
Member

@ToucheSir ToucheSir Jan 30, 2022

Choose a reason for hiding this comment

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

Sorry, I just remembered a previous comment (maybe on Slack? Can't find it now) which noted that our implementation did not match the paper:
image.

TL;DR is that (possibly because of an odd choice of variable names in the paper, they use α instead of η for the learning rate and η for something else), the "fixed" version is wrong and the original is correct. Apologies for the noise.

Copy link
Member

Choose a reason for hiding this comment

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

oh damn, Brian is right, FluxML/Flux.jl#1612 should be reverted, I got confused by the nomenclature

Copy link
Member

Choose a reason for hiding this comment

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

I'll file a PR in Flux

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.

3 participants