13 #ifndef MLPACK_METHODS_ANN_VISITOR_GRADIENT_ZERO_VISITOR_HPP 14 #define MLPACK_METHODS_ANN_VISITOR_GRADIENT_ZERO_VISITOR_HPP 19 #include <boost/variant.hpp> 34 template<
typename LayerType>
42 typename std::enable_if<
43 HasGradientCheck<T, arma::mat&(T::*)()>::value,
void>::type
44 LayerGradients(T* layer, arma::mat& input)
const;
48 template<
typename T,
typename P>
49 typename std::enable_if<
50 !HasGradientCheck<T, P&(T::*)()>::value,
void>::type
51 LayerGradients(T* layer, P& input)
const;
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
void operator()(LayerType *layer) const
Set the gradient to zero.
Definition: gradient_zero_visitor_impl.hpp:28
GradientZeroVisitor()
Set the gradient to zero for the given module.
Definition: gradient_zero_visitor_impl.hpp:22
Definition: gradient_zero_visitor.hpp:27