OpenANN
1.1.0
An open source library for artificial neural networks.
Main Page
Classes
Files
List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
OpenANN
optimization
LBFGS.h
Go to the documentation of this file.
1
#ifndef OPENANN_OPTIMIZATION_LBFGS_H_
2
#define OPENANN_OPTIMIZATION_LBFGS_H_
3
4
#include <
OpenANN/optimization/Optimizer.h
>
5
#include <
OpenANN/optimization/StoppingCriteria.h
>
6
#include <Eigen/Core>
7
#include <optimization.h>
8
9
namespace
OpenANN
10
{
11
20
class
LBFGS
:
public
Optimizer
21
{
22
StoppingCriteria
stop;
23
Optimizable
* opt;
// do not delete
24
Eigen::VectorXd optimum;
25
int
iteration, n, m;
26
Eigen::VectorXd parameters, gradient;
27
double
error;
28
alglib_impl::ae_state envState;
29
alglib::minlbfgsstate state;
30
alglib::real_1d_array xIn;
31
public
:
39
LBFGS
(
int
m = 10);
40
virtual
~LBFGS
() {}
41
virtual
void
setStopCriteria
(
const
StoppingCriteria
& stop);
42
virtual
void
setOptimizable
(
Optimizable
& optimizable);
43
virtual
void
optimize
();
44
virtual
bool
step
();
45
void
initialize
();
46
void
reset
();
47
virtual
Eigen::VectorXd
result
();
48
virtual
std::string
name
();
49
};
50
51
}
// namespace OpenANN
52
53
#endif // OPENANN_OPTIMIZATION_LBFGS_H_
Generated on Wed Jul 9 2014 08:57:52 for OpenANN by
1.8.4