Skip to content

Not all line search methods work with Fminbox #178

@timholy

Description

@timholy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions