Caffe2 - C++ API
A deep learning, cross platform ML framework
rmac_regions_op.h
1 
18 #ifndef CAFFE2_OPERATORS_RMAC_REGIONS_OP_H
19 #define CAFFE2_OPERATORS_RMAC_REGIONS_OP_H
20 
21 #include "caffe2/core/operator.h"
22 
23 namespace caffe2 {
24 
25 template <class Context>
26 class RMACRegionsOp final : public Operator<Context> {
27  public:
28  RMACRegionsOp(const OperatorDef& operator_def, Workspace* ws)
29  : Operator<Context>(operator_def, ws),
30  scales_(OperatorBase::GetSingleArgument<int>("scales", 3)),
31  overlap_(OperatorBase::GetSingleArgument<float>("overlap", 0.4f)) {}
32 
33  USE_OPERATOR_CONTEXT_FUNCTIONS;
34 
35  bool RunOnDevice() override;
36 
37  protected:
38  int scales_;
39  float overlap_;
40  Tensor<Context> num_rois_;
41 };
42 
43 } // namespace caffe2
44 
45 #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:109
Workspace is a class that holds all the related objects created during runtime: (1) all blobs...
Definition: workspace.h:63
Copyright (c) 2016-present, Facebook, Inc.