LineSearches.jl
LineSearches.jl copied to clipboard
Uniformly check conditions
like
if vecnorm(s) == 0
Base.error("Step direction is zero.")
end
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.
What good is a line search if the search direction is the zero element ? It’ll take the exact same step whatever alpha is .
Isn't that a sign of convergence to a local optimum point, unless I missed something?
Exactly ? The test I’m describing here will terminate the line search immediately if the search direction is zero.
Ah, now I think I know what you mean, it should not error of course, just stop :)