-
Notifications
You must be signed in to change notification settings - Fork 16
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
First-order with momentum #250
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #250 +/- ##
==========================================
+ Coverage 88.48% 88.77% +0.28%
==========================================
Files 7 7
Lines 1025 1096 +71
==========================================
+ Hits 907 973 +66
- Misses 118 123 +5 ☔ View full report in Codecov by Sentry. |
add satbeta decrease strategy if iteration is unsuccessful.
The code looks nice and clean, thank you. My main question is: if R2 is a special case of Fomo, I think we should
|
Also, please check the CI failures. In particular, allocation tests fail with Julia 1 and nightly on Linux and macOS: https://github.com/JuliaSmoothOptimizers/JSOSolvers.jl/actions/runs/7745561973/job/21121848905?pr=250#step:6:307 |
- update docstrings - rename qr -> r2 - remove dead code
My only concern is that fomo allocates two more vector than R2, so it's not quite efficient in that respect. But yes, doing so would avoid having an extra implementation. |
This is done with the last few commits. I made sure to keep the exact same |
Looks like allocation test passes with the new Line 313 in 85022e1
and there Lines 327 to 329 in 85022e1
, but I don't see why allocation would occur here. I don't have a unix system, so it's not convenient for me to debug that. |
Co-authored-by: Dominique <[email protected]>
Co-authored-by: Dominique <[email protected]>
Co-authored-by: Dominique <[email protected]>
Co-authored-by: Dominique <[email protected]>
Co-authored-by: Dominique <[email protected]>
Co-authored-by: Dominique <[email protected]>
Co-authored-by: Dominique <[email protected]>
Co-authored-by: Dominique <[email protected]>
Co-authored-by: Dominique <[email protected]>
… into r2-momentum
|
Have you tried https://docs.julialang.org/en/v1/manual/profile/#Line-by-Line-Allocation-Tracking ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments that should help for the allocations
Co-authored-by: Tangi Migot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Thank you, @d-monnet !!! |
Add the new algorithm
$d$ which includes the momentum contribution. The step is computed either in a R2 fashion: $s = -\alpha d$ , or in a TR fashion $s = -\alpha d /||d||$ , by choosing the associated backend.
$\alpha$ is the inverse of the regularization parameter (usually denoted $\sigma$ ) in R2 context and the trust region radius in the TR context.
fomo
to JSOSolvers.First-Order Momentum model-based (FOMO) algorithm can be viewed as the Heavy-Ball algorithm embedded in a R2/first-order Trust-Region framework to ensure the convergence to a first-order critical point in the non-convex case.
fomo
computes steps in a gradient-related directionTests and doc have been updated.