13#include <MachineLearning/BaseGradientOptimizationMethod.h>
17 namespace MachineLearning
75 template<
typename Scalar, LineSearchType LSType = MoreThuente>
103 std::function<
Scalar(
const af::array&, af::array&)> function);
177 virtual bool Optimize(
int* cycle =
nullptr)
override;
Base class for gradient-based optimization methods.
Limited-memory BFGS (L-BFGS or LM-BFGS).
LBFGSSolver(int numberOfVariables, std::function< Scalar(const af::array &, af::array &)> function)
Creates a new instance of the L-BFGS optimization algorithm.
virtual bool Optimize(int *cycle=nullptr) override
Implements the actual optimization algorithm. This method should try to minimize the objective functi...
LBFGSSolver(int numberOfVariables)
Creates a new instance of the L-BFGS optimization algorithm.
void SetMaxLinesearch(int maxIter)
Sets the maximum number of trials for the line search.
LBFGSSolver(NonlinearObjectiveFunction< Scalar > *function)
Creates a new instance of the L-BFGS optimization algorithm.
void SetDelta(Scalar inDelta)
Sets Delta for convergence test.
void SetNumCorrections(int corrections)
Sets number of corrections.