The L_p regularizer for arbitrary integer p.
More...
#include <lregularizer.hpp>
|
| LRegularizer (double factor=1.0) |
| Create the regularizer object. More...
|
|
template<typename MatType > |
void | Evaluate (const MatType &weight, MatType &gradient) |
| Calculate the gradient for regularization. More...
|
|
template<typename Archive > |
void | serialize (Archive &ar, const uint32_t) |
| Serialize the regularizer (nothing to do).
|
|
template<> |
void | Evaluate (const MatType &weight, MatType &gradient) |
|
template<> |
void | Evaluate (const MatType &weight, MatType &gradient) |
|
|
double | factor |
| The constant for the regularization.
|
|
|
static const int | Power = TPower |
| The power of the regularizer.
|
|
template<int TPower>
class mlpack::ann::LRegularizer< TPower >
The L_p regularizer for arbitrary integer p.
- Template Parameters
-
Power | Power of regularizer; i.e. Power = 1 gives the L1-regularization. |
◆ LRegularizer()
Create the regularizer object.
- Parameters
-
factor | The factor for regularization. |
◆ Evaluate()
template<int Power>
template<typename MatType >
Calculate the gradient for regularization.
- Template Parameters
-
MatType | Type of weight matrix. |
- Parameters
-
weight | The weight matrix to be regularized. |
gradient | The calculated gradient. |
The documentation for this class was generated from the following files: