1 #ifndef CAFFE2_OPERATORS_CONV_TRANSPOSE_MOBILE_OP_H_ 2 #define CAFFE2_OPERATORS_CONV_TRANSPOSE_MOBILE_OP_H_ 4 #include "caffe2/core/common.h" 7 #error "mobile build state not defined" 12 #include "caffe2/core/context.h" 13 #include "caffe2/core/operator.h" 14 #include "caffe2/operators/conv_transpose_unpool_op_base.h" 18 template <
typename T,
class Context>
19 class ConvTransposeMobileOp final :
public ConvTransposeUnpoolBase<Context> {
21 USE_CONV_TRANSPOSE_UNPOOL_BASE_FUNCTIONS(Context);
22 ConvTransposeMobileOp(
const OperatorDef& operator_def, Workspace* ws)
23 : ConvTransposeUnpoolBase<Context>(operator_def, ws) {
24 OPERATOR_NEEDS_FEATURE(order_ == StorageOrder::NCHW,
"Only NCHW order is supported right now.");
25 OPERATOR_NEEDS_FEATURE(
26 this->pad_l() == 0,
"operator does not handle row width padding");
27 OPERATOR_NEEDS_FEATURE(
28 this->pad_r() == 0,
"operator does not handle row width padding");
29 OPERATOR_NEEDS_FEATURE(this->stride_w() <= 4,
"stride width must be <= 4");
32 bool RunOnDeviceWithOrderNCHW()
override;
33 bool RunOnDeviceWithOrderNHWC()
override;
38 TensorCPU threadBuffer_;
42 INPUT_TAGS(INPUT, FILTER, BIAS);
47 #endif // CAFFE2_MOBILE 49 #endif // CAFFE2_OPERATORS_CONV_TRANSPOSE_MOBILE_OP_H_ A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...