Caffe2 - C++ API
A deep learning, cross platform ML framework
batch_permutation_op.h
1 
17 #ifndef BATCHPERMUTATION_OP_H_
18 #define BATCHPERMUTATION_OP_H_
19 
20 #include "caffe2/core/context.h"
21 #include "caffe2/core/logging.h"
22 #include "caffe2/core/operator.h"
23 #include "caffe2/utils/math.h"
24 
25 namespace caffe2 {
26 
27 template <typename T, class Context>
28 class BatchPermutationOp final : public Operator<Context> {
29  public:
30  BatchPermutationOp(const OperatorDef& operator_def, Workspace* ws)
31  : Operator<Context>(operator_def, ws) {}
32  USE_OPERATOR_CONTEXT_FUNCTIONS;
33 
34  bool RunOnDevice() override {
35  // No CPU implementation for now
36  CAFFE_NOT_IMPLEMENTED;
37  }
38 };
39 
40 template <typename T, class Context>
41 class BatchPermutationGradientOp final : public Operator<Context> {
42  public:
43  BatchPermutationGradientOp(const OperatorDef& def, Workspace* ws)
44  : Operator<Context>(def, ws) {}
45  USE_OPERATOR_CONTEXT_FUNCTIONS;
46 
47  bool RunOnDevice() override {
48  // No CPU implementation for now
49  CAFFE_NOT_IMPLEMENTED;
50  }
51 };
52 
53 } // namespace caffe2
54 
55 #endif // BATCHPERMUTATION_OP_H_
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.