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

Add ADAM optimizer #57

Merged
merged 4 commits into from
Dec 8, 2023
Merged

Add ADAM optimizer #57

merged 4 commits into from
Dec 8, 2023

Conversation

arvigj
Copy link
Contributor

@arvigj arvigj commented Dec 7, 2023

No description provided.

Copy link

codecov bot commented Dec 7, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (e9bb718) 88.95% compared to head (49edbec) 89.12%.

Files Patch % Lines
...rc/polysolve/nonlinear/descent_strategies/ADAM.cpp 95.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #57      +/-   ##
==========================================
+ Coverage   88.95%   89.12%   +0.16%     
==========================================
  Files          47       49       +2     
  Lines        1902     1950      +48     
==========================================
+ Hits         1692     1738      +46     
- Misses        210      212       +2     
Flag Coverage Δ
polysolve 89.12% <95.83%> (+0.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@teseoch
Copy link
Member

teseoch commented Dec 7, 2023

wow that was quick. Does Adam always produce a descent direction?

@arvigj
Copy link
Contributor Author

arvigj commented Dec 7, 2023

Yes, but the descent direction may not be in the direction of the gradient, so then the descent strategy would change. I don't know if this strategy is good, just wanted to put it here for other to experiment with.

Copy link
Member

@teseoch teseoch left a comment

Choose a reason for hiding this comment

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

can you add the stochastic flag here too?

do we need the is_direction_descent?

@Huangzizhou
Copy link
Contributor

If Adam doesn't necessarily produce a descent direction, you need

bool is_direction_descent() override { return false; }

in the class.

@arvigj arvigj merged commit fbfb31d into polyfem:main Dec 8, 2023
9 checks passed
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