1 #ifndef CAFFE2_OPERATORS_POOL_OP_H_ 2 #define CAFFE2_OPERATORS_POOL_OP_H_ 4 #include "caffe2/core/common_omp.h" 5 #include "caffe2/core/context.h" 6 #include "caffe2/core/logging.h" 7 #include "caffe2/core/operator.h" 8 #include "caffe2/operators/conv_pool_op_base.h" 9 #include "caffe2/utils/math.h" 13 template <
typename T,
class Context,
typename PoolType>
16 USE_CONV_POOL_BASE_FUNCTIONS(Context);
19 for (
int i = 0; i < kernel_.size(); ++i) {
21 dilation_[i] == 1,
"Pooling op does not support dilation right now.");
23 if (!global_pooling_) {
24 for (
int i = 0; i < kernel_.size(); ++i) {
26 pads_[i] < kernel_[i] && pads_[i + kernel_.size()] < kernel_[i],
27 "Pad should be smaller than kernel.");
33 bool RunOnDeviceWithOrderNCHW()
override;
34 bool RunOnDeviceWithOrderNHWC()
override;
40 template <
typename T,
class Context,
class PoolType>
43 USE_CONV_POOL_BASE_FUNCTIONS(Context);
48 bool RunOnDeviceWithOrderNCHW()
override;
49 bool RunOnDeviceWithOrderNHWC()
override;
57 #endif // CAFFE2_OPERATORS_POOL_OP_H_ Workspace is a class that holds all the related objects created during runtime: (1) all blobs...
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...