LineSearches.jl

This is a extension for importing line search algorithms from LineSearches into the SciML interface. Note that these solvers do not come by default, and thus one needs to install the package before using these solvers:

using Pkg
Pkg.add("LineSearches")
using LineSearches, LineSearch

Line Search API

Tip

Unlike LineSearches.jl, we automatically construct the gradient/jacobian functionality from the problem specification using automatic differentiation (if analytic versions are not provided).

LineSearch.LineSearchesJLType
LineSearchesJL(; method = LineSearches.Static(), autodiff = nothing,
    initial_alpha = true)

Wrapper over algorithms from LineSearches.jl. Allows automatic construction of the objective functions for the line search algorithms utilizing automatic differentiation for fast VJPs or JVPs.

Warning

Needs LineSearches.jl to be explicitly loaded before using this functionality.

Arguments

  • method: the line search algorithm to use. Defaults to method = LineSearches.Static(), which means that the step size is fixed to the value of alpha.
  • autodiff: the automatic differentiation backend to use for the line search. Must be specified if analytic jacobian/jvp/vjp is not available.
  • initial_alpha: the initial step size to use. Defaults to true (which is equivalent to 1).
source