13 #ifndef MLPACK_METHODS_ANN_VISITOR_GRADIENT_VISITOR_HPP 14 #define MLPACK_METHODS_ANN_VISITOR_GRADIENT_VISITOR_HPP 19 #include <boost/variant.hpp> 36 GradientVisitor(arma::mat&& input, arma::mat&& delta,
const size_t index);
39 template<
typename LayerType>
58 typename std::enable_if<
59 HasGradientCheck<T, arma::mat&(T::*)()>::value &&
60 !HasRunCheck<T, bool&(T::*)(void)>::value,
void>::type
61 LayerGradients(T* layer, arma::mat& input)
const;
66 typename std::enable_if<
67 HasGradientCheck<T, arma::mat&(T::*)()>::value &&
68 HasRunCheck<T, bool&(T::*)(void)>::value,
void>::type
69 LayerGradients(T* layer, arma::mat& input)
const;
73 template<
typename T,
typename P>
74 typename std::enable_if<
75 !HasGradientCheck<T, P&(T::*)()>::value,
void>::type
76 LayerGradients(T* layer, P& input)
const;
83 #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.