Skip to content

Conversation

@d-monnet
Copy link
Contributor

Add Nesterov's Heavy-Ball and non-linear conjugate gradient (Polak-Ribière and Fletcher-Reeves) momentum strategies.


grad!(nlp, x, ∇fk)
norm_∇fk = norm(∇fk)
oneT = T(1)
Copy link
Member

Choose a reason for hiding this comment

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

Do you really need that ? I think keeping 1 should dispatch to the right type


solver.α = init_alpha(norm_∇fk, step_backend)


Copy link
Member

Choose a reason for hiding this comment

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

Suggested change


grad!(nlp, x, g)
norm_∇fk = norm(g)
d .= -g
Copy link
Member

Choose a reason for hiding this comment

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

does this allocate ? Should it be d .= .-g ?

Comment on lines +648 to +652
"""
# function update_kappa(αk::T, αk₋::T, ::ia_momentum) where {T}
# 1
# end

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"""
# function update_kappa(αk::T, αk₋::T, ::ia_momentum) where {T}
# 1
# end
"""

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.

2 participants