3 #ifndef ROI_ALIGN_OP_H_ 4 #define ROI_ALIGN_OP_H_ 6 #include "caffe2/core/context.h" 7 #include "caffe2/core/logging.h" 8 #include "caffe2/core/operator.h" 12 template <
typename T,
class Context>
17 order_(StringToStorageOrder(
18 OperatorBase::GetSingleArgument<string>(
"order",
"NCHW"))),
20 OperatorBase::GetSingleArgument<float>(
"spatial_scale", 1.)),
21 pooled_height_(OperatorBase::GetSingleArgument<int>(
"pooled_h", 1)),
22 pooled_width_(OperatorBase::GetSingleArgument<int>(
"pooled_w", 1)),
24 OperatorBase::GetSingleArgument<int>(
"sampling_ratio", -1)) {
25 DCHECK_GT(spatial_scale_, 0);
26 DCHECK_GT(pooled_height_, 0);
27 DCHECK_GT(pooled_width_, 0);
28 DCHECK_GE(sampling_ratio_, 0);
29 DCHECK(order_ == StorageOrder::NCHW || order_ == StorageOrder::NHWC);
31 USE_OPERATOR_CONTEXT_FUNCTIONS;
33 bool RunOnDevice()
override {
34 CAFFE_NOT_IMPLEMENTED;
47 #endif // ROI_ALIGN_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 ...