Caffe2 - C++ API
A deep learning, cross platform ML framework
weighted_multi_sampling_op.h
1 #pragma once
2 #include "caffe2/core/context.h"
3 #include "caffe2/core/operator.h"
4 
5 namespace caffe2 {
6 
7 template <class Context>
8 class WeightedMultiSamplingOp : public Operator<Context> {
9  public:
10  USE_OPERATOR_CONTEXT_FUNCTIONS;
11 
12  WeightedMultiSamplingOp(const OperatorDef& operator_def, Workspace* ws)
13  : Operator<Context>(operator_def, ws),
14  num_samples_(
15  OperatorBase::GetSingleArgument<int64_t>("num_samples", 0)) {
16  CAFFE_ENFORCE_GE(num_samples_, 0);
17  }
18 
19  bool RunOnDevice() override;
20 
21  private:
22  const int64_t num_samples_;
23 };
24 
25 } // namespace caffe2
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 ...