OpenPose  1.7.0
The first real-time multi-person system to jointly detect human body, hand, facial, and foot keypoints
maximumCaffe.hpp
Go to the documentation of this file.
1 #ifndef OPENPOSE_NET_MAXIMUM_CAFFE_HPP
2 #define OPENPOSE_NET_MAXIMUM_CAFFE_HPP
3 
5 
6 namespace op
7 {
8  // It mostly follows the Caffe::layer implementation, so Caffe users can easily use it. However, in order to keep
9  // the compatibility with any generic Caffe version, we keep this 'layer' inside our library rather than in the
10  // Caffe code.
11  template <typename T>
13  {
14  public:
15  explicit MaximumCaffe();
16 
17  virtual ~MaximumCaffe();
18 
19  virtual void LayerSetUp(const std::vector<ArrayCpuGpu<T>*>& bottom, const std::vector<ArrayCpuGpu<T>*>& top);
20 
21  virtual void Reshape(const std::vector<ArrayCpuGpu<T>*>& bottom, const std::vector<ArrayCpuGpu<T>*>& top);
22 
23  virtual inline const char* type() const { return "Maximum"; }
24 
25  virtual void Forward(const std::vector<ArrayCpuGpu<T>*>& bottom, const std::vector<ArrayCpuGpu<T>*>& top);
26 
27  virtual void Forward_cpu(const std::vector<ArrayCpuGpu<T>*>& bottom, const std::vector<ArrayCpuGpu<T>*>& top);
28 
29  virtual void Forward_gpu(const std::vector<ArrayCpuGpu<T>*>& bottom, const std::vector<ArrayCpuGpu<T>*>& top);
30 
31  virtual void Backward_cpu(const std::vector<ArrayCpuGpu<T>*>& top, const std::vector<bool>& propagate_down,
32  const std::vector<ArrayCpuGpu<T>*>& bottom);
33 
34  virtual void Backward_gpu(const std::vector<ArrayCpuGpu<T>*>& top, const std::vector<bool>& propagate_down,
35  const std::vector<ArrayCpuGpu<T>*>& bottom);
36 
37  private:
38  std::array<int, 4> mBottomSize;
39  std::array<int, 4> mTopSize;
40  };
41 }
42 
43 #endif // OPENPOSE_NET_MAXIMUM_CAFFE_HPP
virtual ~MaximumCaffe()
virtual void LayerSetUp(const std::vector< ArrayCpuGpu< T > * > &bottom, const std::vector< ArrayCpuGpu< T > * > &top)
virtual void Forward(const std::vector< ArrayCpuGpu< T > * > &bottom, const std::vector< ArrayCpuGpu< T > * > &top)
virtual void Forward_gpu(const std::vector< ArrayCpuGpu< T > * > &bottom, const std::vector< ArrayCpuGpu< T > * > &top)
virtual const char * type() const
virtual void Backward_gpu(const std::vector< ArrayCpuGpu< T > * > &top, const std::vector< bool > &propagate_down, const std::vector< ArrayCpuGpu< T > * > &bottom)
virtual void Reshape(const std::vector< ArrayCpuGpu< T > * > &bottom, const std::vector< ArrayCpuGpu< T > * > &top)
virtual void Backward_cpu(const std::vector< ArrayCpuGpu< T > * > &top, const std::vector< bool > &propagate_down, const std::vector< ArrayCpuGpu< T > * > &bottom)
virtual void Forward_cpu(const std::vector< ArrayCpuGpu< T > * > &bottom, const std::vector< ArrayCpuGpu< T > * > &top)