LineSearches.jl icon indicating copy to clipboard operation
LineSearches.jl copied to clipboard

Uniformly check conditions

Open pkofod opened this issue 6 years ago • 5 comments

like

if vecnorm(s) == 0
    Base.error("Step direction is zero.")
end

pkofod avatar Apr 05 '18 11:04 pkofod

Hmm, won't this be a problem for non-smooth optimization if the gradient happens to be exactly 0 at the neighborhood of the minimum? Think of a cut-off abs function.

mohamed82008 avatar Apr 08 '18 04:04 mohamed82008

What good is a line search if the search direction is the zero element ? It’ll take the exact same step whatever alpha is .

pkofod avatar Apr 08 '18 09:04 pkofod

Isn't that a sign of convergence to a local optimum point, unless I missed something?

mohamed82008 avatar Apr 08 '18 10:04 mohamed82008

Exactly ? The test I’m describing here will terminate the line search immediately if the search direction is zero.

pkofod avatar Apr 08 '18 11:04 pkofod

Ah, now I think I know what you mean, it should not error of course, just stop :)

pkofod avatar Apr 08 '18 11:04 pkofod