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