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 unsigned int );
52 static const int Power = TPower;
73 #include "lregularizer_impl.hpp" The L_p regularizer for arbitrary integer p.
static const int Power
The power of the regularizer.
The core includes that mlpack expects; standard C++ includes and Armadillo.
LRegularizer(double factor=1.0)
Create the regularizer object.
LRegularizer< 2 > L2Regularizer
The L2 Regularizer.
void serialize(Archive &ar, const unsigned int)
Serialize the regularizer (nothing to do).
LRegularizer< 1 > L1Regularizer
The L1 Regularizer.
void Evaluate(const MatType &weight, MatType &gradient)
Calculate the gradient for regularization.
double factor
The constant for the regularization.