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
Unlike LineSearches.jl
, we automatically construct the gradient/jacobian functionality from the problem specification using automatic differentiation (if analytic versions are not provided).
LineSearch.LineSearchesJL
— TypeLineSearchesJL(; 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.
Needs LineSearches.jl
to be explicitly loaded before using this functionality.
Arguments
method
: the line search algorithm to use. Defaults tomethod = LineSearches.Static()
, which means that the step size is fixed to the value ofalpha
.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 totrue
(which is equivalent to1
).