Caffe2 - C++ API
A deep learning, cross platform ML framework
rmac_regions_op.h
1 
2 #ifndef CAFFE2_OPERATORS_RMAC_REGIONS_OP_H
3 #define CAFFE2_OPERATORS_RMAC_REGIONS_OP_H
4 
5 #include "caffe2/core/operator.h"
6 
7 namespace caffe2 {
8 
9 template <class Context>
10 class RMACRegionsOp final : public Operator<Context> {
11  public:
12  RMACRegionsOp(const OperatorDef& operator_def, Workspace* ws)
13  : Operator<Context>(operator_def, ws),
14  scales_(OperatorBase::GetSingleArgument<int>("scales", 3)),
15  overlap_(OperatorBase::GetSingleArgument<float>("overlap", 0.4f)) {}
16 
17  USE_OPERATOR_CONTEXT_FUNCTIONS;
18 
19  bool RunOnDevice() override;
20 
21  protected:
22  int scales_;
23  float overlap_;
24  Tensor<Context> num_rois_;
25 };
26 
27 } // namespace caffe2
28 
29 #endif // CAFFE2_OPERATORS_RMAC_REGIONS_OP_H
Tensor is the basic class in Caffe2 that stores a contiguous memory with its shape information...
Definition: tensor.h:93
Workspace is a class that holds all the related objects created during runtime: (1) all blobs...
Definition: workspace.h:47
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...