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
51 LayerGradients(T* layer, arma::mat& input)
const;
55 template<
typename T,
typename P>
56 typename std::enable_if<
57 !HasGradientCheck<T, P&(T::*)()>::value,
void>::type
58 LayerGradients(T* layer, P& input)
const;
65 #include "gradient_visitor_impl.hpp"
SearchModeVisitor executes the Gradient() method of the given module using the input and delta parame...
void operator()(LayerType *layer) const
Executes the Gradient() method.
GradientVisitor(arma::mat &&input, arma::mat &&delta)
Executes the Gradient() method of the given module using the input and delta parameter.