17 #ifndef ROI_POOL_F_OP_H_ 18 #define ROI_POOL_F_OP_H_ 20 #include "caffe2/core/context.h" 21 #include "caffe2/core/logging.h" 22 #include "caffe2/core/operator.h" 23 #include "caffe2/utils/math.h" 27 template <
typename T,
class Context>
32 spatial_scale_(this->
template GetSingleArgument<float>(
33 "spatial_scale", 1.)),
34 pooled_height_(this->
template GetSingleArgument<int>(
"pooled_h", 1)),
35 pooled_width_(this->
template GetSingleArgument<int>(
"pooled_w", 1)) {
36 DCHECK_GT(spatial_scale_, 0);
37 DCHECK_GT(pooled_height_, 0);
38 DCHECK_GT(pooled_width_, 0);
40 USE_OPERATOR_CONTEXT_FUNCTIONS;
42 bool RunOnDevice()
override {
44 CAFFE_NOT_IMPLEMENTED;
53 template <
typename T,
class Context>
58 spatial_scale_(this->
template GetSingleArgument<float>(
59 "spatial_scale", 1.)),
60 pooled_height_(this->
template GetSingleArgument<int>(
"pooled_h", 1)),
61 pooled_width_(this->
template GetSingleArgument<int>(
"pooled_w", 1)) {
62 DCHECK_GT(spatial_scale_, 0);
63 DCHECK_GT(pooled_height_, 0);
64 DCHECK_GT(pooled_width_, 0);
66 USE_OPERATOR_CONTEXT_FUNCTIONS;
68 bool RunOnDevice()
override {
70 CAFFE_NOT_IMPLEMENTED;
81 #endif // ROI_POOL_F_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 ...