13 #ifndef MLPACK_METHODS_ANN_LREGULARIZER_HPP 14 #define MLPACK_METHODS_ANN_LREGULARIZER_HPP 44 template<
typename MatType>
45 void Evaluate(
const MatType& weight, MatType& gradient);
48 template<
typename Archive>
49 void serialize(Archive& ar,
const uint32_t );
52 static const int Power = TPower;
double factor
The constant for the regularization.
Definition: lregularizer.hpp:55
The L_p regularizer for arbitrary integer p.
Definition: lregularizer.hpp:27
LRegularizer< 2 > L2Regularizer
The L2 Regularizer.
Definition: lregularizer.hpp:67
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
The core includes that mlpack expects; standard C++ includes and Armadillo.
LRegularizer(double factor=1.0)
Create the regularizer object.
Definition: lregularizer_impl.hpp:22
LRegularizer< 1 > L1Regularizer
The L1 Regularizer.
Definition: lregularizer.hpp:62
static const int Power
The power of the regularizer.
Definition: lregularizer.hpp:52
void Evaluate(const MatType &weight, MatType &gradient)
Calculate the gradient for regularization.
Definition: lregularizer_impl.hpp:31
void serialize(Archive &ar, const uint32_t)
Serialize the regularizer (nothing to do).
Definition: lregularizer_impl.hpp:54