load_output_parameter_visitor.hpp
Go to the documentation of this file.
1 
14 #ifndef MLPACK_METHODS_ANN_VISITOR_LOAD_OUTPUT_PARAMETER_VISITOR_HPP
15 #define MLPACK_METHODS_ANN_VISITOR_LOAD_OUTPUT_PARAMETER_VISITOR_HPP
16 
18 
19 #include <boost/variant.hpp>
20 
21 namespace mlpack {
22 namespace ann {
23 
28 class LoadOutputParameterVisitor : public boost::static_visitor<void>
29 {
30  public:
32  LoadOutputParameterVisitor(std::vector<arma::mat>&& parameter);
33 
35  template<typename LayerType>
36  void operator()(LayerType* layer) const;
37 
38  private:
40  std::vector<arma::mat>&& parameter;
41 
44  template<typename T>
45  typename std::enable_if<
46  !HasModelCheck<T>::value, void>::type
47  OutputParameter(T* layer) const;
48 
51  template<typename T>
52  typename std::enable_if<
53  HasModelCheck<T>::value, void>::type
54  OutputParameter(T* layer) const;
55 };
56 
57 } // namespace ann
58 } // namespace mlpack
59 
60 // Include implementation.
61 #include "load_output_parameter_visitor_impl.hpp"
62 
63 #endif
void operator()(LayerType *layer) const
Restore the output parameter.
.hpp
Definition: add_to_po.hpp:21
LoadOutputParameterVisitor(std::vector< arma::mat > &&parameter)
Restore the output parameter given a parameter set.
LoadOutputParameterVisitor restores the output parameter using the given parameter set...