My Project
Classes | Typedefs | Functions | Variables
cpu_mlp Namespace Reference

Classes

struct  Linear
 Linear activation (identity). More...
 
struct  ReLU
 ReLU activation. More...
 
struct  Sigmoid
 Sigmoid activation. More...
 
struct  Tanh
 Tanh activation. More...
 
class  Layer
 Abstract layer interface. More...
 
class  DenseLayer
 Fully-connected layer with activation. More...
 
class  BFGS
 BFGS (Broyden–Fletcher–Goldfarb–Shanno) minimizer. More...
 
class  FullBatchMinimizer
 Base class for Full Batch Minimizers. More...
 
class  GradientDescent
 Standard Gradient Descent with optional Line Search. More...
 
class  LBFGS
 Limited-memory BFGS (L-BFGS) minimizer. More...
 
class  Newton
 Newton minimizer (full Newton) for unconstrained optimization. More...
 
class  RingBuffer
 A fixed-capacity ring buffer (circular buffer). More...
 
class  StochasticGradientDescent
 Stochastic Gradient Descent (SGD) minimizer. More...
 
class  SLBFGS
 Stochastic Limited-memory BFGS (S-LBFGS) minimizer. More...
 
class  StochasticMinimizer
 Base class for Stochastic Minimizers. More...
 
class  Network
 Simple feedforward network with contiguous parameter storage. More...
 

Typedefs

template<typename M >
using DefaultSolverT = typename std::conditional< isSparse< M >, Eigen::ConjugateGradient< M >, Eigen::LDLT< M > >::type
 

Functions

template<typename V , typename BatchFn >
finite_difference_hvp_batch (BatchFn &g, const V &weights, const std::vector< size_t > &indices, const V &v, double epsilon=1e-4)
 
template<typename V >
lbfgs_two_loop (const RingBuffer< V > &s_list, const RingBuffer< V > &y_list, const RingBuffer< double > &rho_list, const V &v)
 

Variables

template<typename M >
constexpr bool isSparse = std::is_base_of_v<Eigen::SparseMatrixBase<M>, M>
 

Typedef Documentation

◆ DefaultSolverT

template<typename M >
using cpu_mlp::DefaultSolverT = typedef typename std::conditional<isSparse<M>, Eigen::ConjugateGradient<M>, Eigen::LDLT<M> >::type

Function Documentation

◆ finite_difference_hvp_batch()

template<typename V , typename BatchFn >
V cpu_mlp::finite_difference_hvp_batch ( BatchFn &  g,
const V &  weights,
const std::vector< size_t > &  indices,
const V &  v,
double  epsilon = 1e-4 
)
Here is the caller graph for this function:

◆ lbfgs_two_loop()

template<typename V >
V cpu_mlp::lbfgs_two_loop ( const RingBuffer< V > &  s_list,
const RingBuffer< V > &  y_list,
const RingBuffer< double > &  rho_list,
const V &  v 
)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ isSparse

template<typename M >
constexpr bool cpu_mlp::isSparse = std::is_base_of_v<Eigen::SparseMatrixBase<M>, M>
constexpr