mlpack  master
Public Member Functions | Private Member Functions | Private Attributes | List of all members
mlpack::ann::GradientVisitor Class Reference

SearchModeVisitor executes the Gradient() method of the given module using the input and delta parameter. More...

Inheritance diagram for mlpack::ann::GradientVisitor:
Inheritance graph
[legend]

Public Member Functions

 GradientVisitor (arma::mat &&input, arma::mat &&delta)
 Executes the Gradient() method of the given module using the input and delta parameter. More...
 
template<typename LayerType >
void operator() (LayerType *layer) const
 Executes the Gradient() method. 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
 Execute the Gradient() function 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 execute the Gradient() function if the module doesn't implement the Gradient() function. More...
 

Private Attributes

arma::mat && delta
 The delta parameter. More...
 
arma::mat && input
 The input set. More...
 

Detailed Description

SearchModeVisitor executes the Gradient() method of the given module using the input and delta parameter.

Definition at line 28 of file gradient_visitor.hpp.

Constructor & Destructor Documentation

mlpack::ann::GradientVisitor::GradientVisitor ( arma::mat &&  input,
arma::mat &&  delta 
)

Executes the Gradient() method of the given module using the input and delta parameter.

Member Function Documentation

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

Execute the Gradient() function if the module implements the Gradient() function.

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

Do not execute the Gradient() function if the module doesn't implement the Gradient() function.

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

Executes the Gradient() method.

Member Data Documentation

arma::mat&& mlpack::ann::GradientVisitor::delta
private

The delta parameter.

Definition at line 44 of file gradient_visitor.hpp.

arma::mat&& mlpack::ann::GradientVisitor::input
private

The input set.

Definition at line 41 of file gradient_visitor.hpp.


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