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

Problem with initial guess

Open ebelnikola opened this issue 2 years ago • 0 comments

I am not sure if this is intentional or not, but all the optimisation algorithms exit with an error if the initial guess was exactly at the optimum. The simplest example: using OptimKit; alg=GradientDescent(;); fg(x)=sum(x.^2), 2.0 .*x; optimize(fg, [0.],alg); This code terminates with an error "linesearch was not given a descent direction!". The same for the conjugate gradient algorithm. The LBFGS algorithm tries to start the linear search with d $d\phi_0=NaN$ and stalls without an error message.

ebelnikola avatar Oct 23 '23 11:10 ebelnikola