Caffe2 - C++ API
A deep learning, cross platform ML framework
concat_dnnlowp_op.h
1 #pragma once
2 
3 #include "caffe2/operators/concat_split_op.h"
4 #include "dnnlowp_op.h"
5 
6 namespace caffe2 {
7 
8 template <typename T>
9 class ConcatDNNLowPOp final : public DNNLowPOp<T, ConcatOp<CPUContext>> {
10  public:
11  ConcatDNNLowPOp(const OperatorDef& operator_def, Workspace* ws);
12  bool RunOnDevice() override;
13 
14  USE_OPERATOR_FUNCTIONS(CPUContext);
15  USE_DNNLOWP_OPERATOR_BASE_FUNCTIONS(T, ConcatOp<CPUContext>);
16 
17  private:
18  void GetQuantizationParameters_();
19 
20  int axis_;
21  int add_axis_;
22  // Input: a number of tensors. Output: Y, split
23  // The split are stored in CPU.
24 
25  std::vector<dnnlowp::RequantizationParams> requantization_params_;
26 }; // class ConcatDNNLowPOp
27 
28 } // namespace caffe2
The CPU Context, representing the bare minimum of what a Context class in Caffe2 should implement...
Definition: context.h:40
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 ...
Definition: blob.h:13
A convenient base class for C2 operators with DNNLOWP engine.
Definition: dnnlowp_op.h:77