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

Extended trace for Adam fails #1096

Open
tam724 opened this issue May 17, 2024 · 0 comments
Open

Extended trace for Adam fails #1096

tam724 opened this issue May 17, 2024 · 0 comments

Comments

@tam724
Copy link

tam724 commented May 17, 2024

When running an optimization with Adam() and the extended trace enabled, the code fails. See the following MWE:

using Optim
f(x) = (x[1]-1)^2
 # runs without error
Optim.optimize(f, [0.0], Adam(), Optim.Options(extended_trace=false))
# fails with "type AdamState has no field alpha"
Optim.optimize(f, [0.0], Adam(), Optim.Options(extended_trace=true))

The problem is that common_trace! tries to access state.alpha, which is not a property of AdamState.

Tested on Optim v1.9.4 and julia v1.10.3.

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

1 participant