Caffe2 - C++ API
A deep learning, cross platform ML framework
Related Pages
Modules
Data Structures
Files
C++ API
Python API
GitHub
File List
Globals
caffe2
operators
weighted_sample_op.h
1
// Copyright 2004-present Facebook. All Rights Reserved.
2
3
#ifndef CAFFE2_OPERATORS_WEIGHTEDSAMPLE_OP_H_
4
#define CAFFE2_OPERATORS_WEIGHTEDSAMPLE_OP_H_
5
6
#include "caffe2/core/context.h"
7
#include "caffe2/core/operator.h"
8
#include "caffe2/core/tensor.h"
9
#include "caffe2/utils/math.h"
10
11
namespace
caffe2
{
12
13
template
<
typename
T,
class
Context>
14
class
WeightedSampleOp
final :
public
Operator
<Context> {
15
public
:
16
template
<
class
... Args>
17
explicit
WeightedSampleOp
(Args&&... args)
18
:
Operator<Context>
(std::forward<Args>(args)...) {}
19
20
USE_OPERATOR_CONTEXT_FUNCTIONS;
21
22
bool
RunOnDevice()
override
;
23
24
private
:
25
vector<float> cum_mass_;
26
Tensor
unif_samples_;
27
};
28
29
}
// namespace caffe2
30
31
#endif // CAFFE2_OPERATORS_WEIGHTEDSAMPLE_OP_H_
nom::repr::Tensor
Definition:
NeuralNet.h:158
caffe2
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition:
blob.h:13
caffe2::WeightedSampleOp
Definition:
weighted_sample_op.h:14
caffe2::Operator
Definition:
operator.h:677
Generated on Thu Mar 21 2019 13:06:20 for Caffe2 - C++ API by
1.8.11