mlpack 3.4.2
orthogonal_regularizer.hpp
Go to the documentation of this file.
1
12#ifndef MLPACK_METHODS_ANN_ORTHOGONAL_REGULARIZER_HPP
13#define MLPACK_METHODS_ANN_ORTHOGONAL_REGULARIZER_HPP
14
15#include <mlpack/prereqs.hpp>
16
17namespace mlpack {
18namespace ann {
19
39{
40 public:
47
55 template<typename MatType>
56 void Evaluate(const MatType& weight, MatType& gradient);
57
59 template<typename Archive>
60 void serialize(Archive& ar, const unsigned int /* version */);
61
63 double factor;
64};
65
66} // namespace ann
67} // namespace mlpack
68
69// Include implementation.
70#include "orthogonal_regularizer_impl.hpp"
71
72#endif
Implementation of the OrthogonalRegularizer.
double factor
The constant for the regularization.
void Evaluate(const MatType &weight, MatType &gradient)
Calculate the gradient for regularization.
OrthogonalRegularizer(double factor=1.0)
Create the regularizer object.
void serialize(Archive &ar, const unsigned int)
Serialize the regularizer (nothing to do).
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.