17 #ifndef PS_ROI_POOL_OP_H_ 18 #define PS_ROI_POOL_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 group_size_(this->
template GetSingleArgument<int>(
"group_size", 1)),
35 output_dim_(this->
template GetSingleArgument<int>(
"output_dim", 1)) {
36 DCHECK_GT(spatial_scale_, 0);
37 DCHECK_GT(group_size_, 0);
38 pooled_height_ = group_size_;
39 pooled_width_ = group_size_;
41 USE_OPERATOR_CONTEXT_FUNCTIONS;
43 bool RunOnDevice()
override {
45 CAFFE_NOT_IMPLEMENTED;
59 template <
typename T,
class Context>
64 spatial_scale_(this->
template GetSingleArgument<float>(
65 "spatial_scale", 1.)),
66 group_size_(this->
template GetSingleArgument<int>(
"group_size", 1)),
67 output_dim_(this->
template GetSingleArgument<int>(
"output_dim", 1)) {
68 DCHECK_GT(spatial_scale_, 0);
69 DCHECK_GT(group_size_, 0);
70 pooled_height_ = group_size_;
71 pooled_width_ = group_size_;
73 USE_OPERATOR_CONTEXT_FUNCTIONS;
75 bool RunOnDevice()
override {
77 CAFFE_NOT_IMPLEMENTED;
93 #endif // PS_ROI_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 ...