LineSearches.jl
LineSearches.jl copied to clipboard
Not all line search methods work with Fminbox
This is implicit in #81, but just to document it:
julia> using LineSearches, Optim
julia> f(x) = sum(abs2, x)
f (generic function with 1 method)
julia> optimize(f, [0.5], [1.5], [1.0], Fminbox(LBFGS(linesearch=LineSearches.MoreThuente())); autodiff=:forward)
┌ Warning: Terminated early due to NaN in gradient.
└ @ Optim ~/.julia/packages/Optim/ZhuZN/src/multivariate/optimize/optimize.jl:98
* Status: failure
* Candidate solution
Final objective value: NaN
* Found with
Algorithm: Fminbox with L-BFGS
* Convergence measures
|x - x'| = NaN ≰ 0.0e+00
|x - x'|/|x'| = NaN ≰ 0.0e+00
|f(x) - f(x')| = 0.00e+00 ≤ 0.0e+00
|f(x) - f(x')|/|f(x')| = NaN ≰ 0.0e+00
|g(x)| = NaN ≰ 1.0e-08
* Work counters
Seconds run: 1 (vs limit Inf)
Iterations: 2
f(x) calls: 28
∇f(x) calls: 28