1 #ifndef CAFFE2_OPERATORS_CONV_OP_H_ 2 #define CAFFE2_OPERATORS_CONV_OP_H_ 4 #include "caffe2/core/context.h" 5 #include "caffe2/core/operator.h" 6 #include "caffe2/operators/conv_op_shared.h" 7 #include "caffe2/operators/conv_pool_op_base.h" 9 CAFFE2_DECLARE_bool(caffe2_force_shared_col_buffer);
13 template <
typename T,
class Context>
16 USE_CONV_POOL_BASE_FUNCTIONS(Context);
22 group_ == 1 || order_ == StorageOrder::NCHW,
23 "Group convolution only supports NCHW order right now.");
27 if (FLAGS_caffe2_force_shared_col_buffer || shared_buffer_) {
28 createSharedBuffer<Context>(ws_);
33 bool RunOnDeviceWithOrderNCHW()
override;
34 bool RunOnDeviceWithOrderNHWC()
override;
43 INPUT_TAGS(INPUT, FILTER, BIAS);
46 template <
typename T,
class Context>
49 USE_CONV_POOL_BASE_FUNCTIONS(Context);
52 no_bias_(OperatorBase::GetSingleArgument<int>(
"no_bias", 0)) {
54 !(no_bias_ && OutputSize() == 3),
55 "If bias is not present, you should not have 3 grad output.");
57 group_ == 1 || order_ == StorageOrder::NCHW,
58 "Group convolution only supports NCHW order right now.");
62 bool RunOnDeviceWithOrderNCHW()
override;
63 bool RunOnDeviceWithOrderNHWC()
override;
73 INPUT_TAGS(INPUT, FILTER, OUTPUT_GRAD);
74 OUTPUT_TAGS(FILTER_GRAD, BIAS_OR_INPUT_GRAD, INPUT_GRAD);
79 #endif // CAFFE2_OPERATORS_CONV_OP_H_
Tensor is the basic class in Caffe2 that stores a contiguous memory with its shape information...
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 ...