1 #ifndef OPENPOSE_NET_RESIZE_AND_MERGE_CAFFE_HPP
2 #define OPENPOSE_NET_RESIZE_AND_MERGE_CAFFE_HPP
22 const T netFactor,
const T scaleFactor,
const bool mergeFirstDimension =
true,
25 virtual inline const char*
type()
const {
return "ResizeAndMerge"; }
44 std::vector<T*> mTempGPUData;
45 std::vector<T> mScaleRatios;
46 std::vector<std::array<int, 4>> mBottomSizes;
47 std::array<int, 4> mTopSize;
virtual void Forward_gpu(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 Backward_cpu(const std::vector< ArrayCpuGpu< T > * > &top, const std::vector< bool > &propagate_down, const std::vector< ArrayCpuGpu< T > * > &bottom)
virtual ~ResizeAndMergeCaffe()
virtual void Forward_cpu(const std::vector< ArrayCpuGpu< T > * > &bottom, const std::vector< ArrayCpuGpu< T > * > &top)
virtual const char * type() const
void setScaleRatios(const std::vector< T > &scaleRatios)
virtual void Forward_ocl(const std::vector< ArrayCpuGpu< T > * > &bottom, const std::vector< ArrayCpuGpu< T > * > &top)
virtual void Reshape(const std::vector< ArrayCpuGpu< T > * > &bottom, const std::vector< ArrayCpuGpu< T > * > &top, const T netFactor, const T scaleFactor, const bool mergeFirstDimension=true, const int gpuID=0)
virtual void Backward_gpu(const std::vector< ArrayCpuGpu< T > * > &top, const std::vector< bool > &propagate_down, const std::vector< ArrayCpuGpu< T > * > &bottom)
virtual void LayerSetUp(const std::vector< ArrayCpuGpu< T > * > &bottom, const std::vector< ArrayCpuGpu< T > * > &top)