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  template <class... Args>
13  explicit WeightedMultiSamplingOp(Args&&... args)
14  : Operator<Context>(std::forward<Args>(args)...),
15  num_samples_(
16  this->template GetSingleArgument<int64_t>("num_samples", 0)) {
17  CAFFE_ENFORCE_GE(num_samples_, 0);
18  }
19 
20  bool RunOnDevice() override;
21 
22  private:
23  const int64_t num_samples_;
24 };
25 
26 } // namespace caffe2
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition: blob.h:13