output_height_visitor.hpp
Go to the documentation of this file.
1 
14 #ifndef MLPACK_METHODS_ANN_VISITOR_OUTPUT_HEIGHT_VISITOR_HPP
15 #define MLPACK_METHODS_ANN_VISITOR_OUTPUT_HEIGHT_VISITOR_HPP
16 
18 
19 #include <boost/variant.hpp>
20 
21 namespace mlpack {
22 namespace ann {
23 
27 class OutputHeightVisitor : public boost::static_visitor<size_t>
28 {
29  public:
31  template<typename LayerType>
32  size_t operator()(LayerType* layer) const;
33 
34  private:
37  template<typename T>
38  typename std::enable_if<
39  !HasInputHeight<T, size_t&(T::*)()>::value &&
40  !HasModelCheck<T>::value, size_t>::type
41  LayerOutputHeight(T* layer) const;
42 
45  template<typename T>
46  typename std::enable_if<
47  HasInputHeight<T, size_t&(T::*)()>::value &&
48  !HasModelCheck<T>::value, size_t>::type
49  LayerOutputHeight(T* layer) const;
50 
52  template<typename T>
53  typename std::enable_if<
54  !HasInputHeight<T, size_t&(T::*)()>::value &&
55  HasModelCheck<T>::value, size_t>::type
56  LayerOutputHeight(T* layer) const;
57 
60  template<typename T>
61  typename std::enable_if<
62  HasInputHeight<T, size_t&(T::*)()>::value &&
63  HasModelCheck<T>::value, size_t>::type
64  LayerOutputHeight(T* layer) const;
65 };
66 
67 } // namespace ann
68 } // namespace mlpack
69 
70 // Include implementation.
71 #include "output_height_visitor_impl.hpp"
72 
73 #endif
OutputWidthVisitor exposes the OutputHeight() method of the given module.
.hpp
Definition: add_to_po.hpp:21
size_t operator()(LayerType *layer) const
Return the output height.