13 #ifndef MLPACK_METHODS_ANN_VISITOR_GRADIENT_VISITOR_HPP 14 #define MLPACK_METHODS_ANN_VISITOR_GRADIENT_VISITOR_HPP 19 #include <boost/variant.hpp> 36 template<
typename LayerType>
49 typename std::enable_if<
50 HasGradientCheck<T, arma::mat&(T::*)()>::value,
void>::type
55 template<
typename T,
typename P>
56 typename std::enable_if<
57 !HasGradientCheck<T, P&(T::*)()>::value,
void>::type
65 #include "gradient_visitor_impl.hpp" arma::mat && input
The input set.
Linear algebra utility functions, generally performed on matrices or vectors.
void operator()(LayerType *layer) const
Executes the Gradient() method.
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. ...
GradientVisitor(arma::mat &&input, arma::mat &&delta)
Executes the Gradient() method of the given module using the input and delta parameter.
arma::mat && delta
The delta parameter.
SearchModeVisitor executes the Gradient() method of the given module using the input and delta parame...