forward_visitor.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_METHODS_ANN_VISITOR_FORWARD_VISITOR_HPP
14 #define MLPACK_METHODS_ANN_VISITOR_FORWARD_VISITOR_HPP
15 
18 
19 #include <boost/variant.hpp>
20 
21 namespace mlpack {
22 namespace ann {
23 
28 class ForwardVisitor : public boost::static_visitor<void>
29 {
30  public:
32  ForwardVisitor(arma::mat&& input, arma::mat&& output);
33 
35  template<typename LayerType>
36  void operator()(LayerType* layer) const;
37 
38  void operator()(MoreTypes layer) const;
39 
40  private:
42  arma::mat&& input;
43 
45  arma::mat&& output;
46 };
47 
48 } // namespace ann
49 } // namespace mlpack
50 
51 // Include implementation.
52 #include "forward_visitor_impl.hpp"
53 
54 #endif
boost::variant< Recurrent< arma::mat, arma::mat > *, RecurrentAttention< arma::mat, arma::mat > *, ReinforceNormal< arma::mat, arma::mat > *, Reparametrization< arma::mat, arma::mat > *, Select< arma::mat, arma::mat > *, Sequential< arma::mat, arma::mat, false > *, Sequential< arma::mat, arma::mat, true > *, Subview< arma::mat, arma::mat > *, VRClassReward< arma::mat, arma::mat > *, VirtualBatchNorm< arma::mat, arma::mat > *> MoreTypes
strip_type.hpp
Definition: add_to_po.hpp:21
ForwardVisitor executes the Forward() function given the input and output parameter.
void operator()(LayerType *layer) const
Execute the Forward() function.
ForwardVisitor(arma::mat &&input, arma::mat &&output)
Execute the Forward() function given the input and output parameter.