backward_visitor.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_METHODS_ANN_VISITOR_BACKWARD_VISITOR_HPP
14 #define MLPACK_METHODS_ANN_VISITOR_BACKWARD_VISITOR_HPP
15 
18 
19 #include <boost/variant.hpp>
20 
21 namespace mlpack {
22 namespace ann {
23 
28 class BackwardVisitor : public boost::static_visitor<void>
29 {
30  public:
33  BackwardVisitor(arma::mat&& input, arma::mat&& error, arma::mat&& delta);
34 
36  template<typename LayerType>
37  void operator()(LayerType* layer) const;
38 
39  private:
41  arma::mat&& input;
42 
44  arma::mat&& error;
45 
47  arma::mat&& delta;
48 };
49 
50 } // namespace ann
51 } // namespace mlpack
52 
53 // Include implementation.
54 #include "backward_visitor_impl.hpp"
55 
56 #endif
BackwardVisitor executes the Backward() function given the input, error and delta parameter...
.hpp
Definition: add_to_po.hpp:21
BackwardVisitor(arma::mat &&input, arma::mat &&error, arma::mat &&delta)
Execute the Backward() function given the input, error and delta parameter.
void operator()(LayerType *layer) const
Execute the Backward() function.