mlpack  master
Public Member Functions | Private Member Functions | List of all members
mlpack::ann::GradientZeroVisitor Class Reference
Inheritance diagram for mlpack::ann::GradientZeroVisitor:
Inheritance graph
[legend]

Public Member Functions

 GradientZeroVisitor ()
 Set the gradient to zero for the given module. More...
 
template<typename LayerType >
void operator() (LayerType *layer) const
 Set the gradient to zero. More...
 

Private Member Functions

template<typename T >
std::enable_if< HasGradientCheck< T, arma::mat &(T::*)()>::value, void >::type LayerGradients (T *layer, arma::mat &input) const
 Set the gradient to zero if the module implements the Gradient() function. More...
 
template<typename T , typename P >
std::enable_if< !HasGradientCheck< T, P &(T::*)()>::value, void >::type LayerGradients (T *layer, P &input) const
 Do not set the gradient to zero if the module doesn't implement the Gradient() function. More...
 

Detailed Description

Definition at line 27 of file gradient_zero_visitor.hpp.

Constructor & Destructor Documentation

mlpack::ann::GradientZeroVisitor::GradientZeroVisitor ( )

Set the gradient to zero for the given module.

Member Function Documentation

template<typename T >
std::enable_if< HasGradientCheck<T, arma::mat&(T::*)()>::value, void>::type mlpack::ann::GradientZeroVisitor::LayerGradients ( T *  layer,
arma::mat &  input 
) const
private

Set the gradient to zero if the module implements the Gradient() function.

template<typename T , typename P >
std::enable_if< !HasGradientCheck<T, P&(T::*)()>::value, void>::type mlpack::ann::GradientZeroVisitor::LayerGradients ( T *  layer,
P &  input 
) const
private

Do not set the gradient to zero if the module doesn't implement the Gradient() function.

template<typename LayerType >
void mlpack::ann::GradientZeroVisitor::operator() ( LayerType *  layer) const

Set the gradient to zero.


The documentation for this class was generated from the following file: