Caffe2 - C++ API
A deep learning, cross platform ML framework
int8_given_tensor_fill_op.cc
1 #include "int8_given_tensor_fill_op.h"
2 
3 namespace caffe2 {
4 
5 OPERATOR_SCHEMA(Int8GivenTensorFill)
6  .NumInputs(0)
7  .NumOutputs(1)
8  .Arg("values", "Input array of type char(byte)")
9  .Arg("shape", "Input tensor shape")
10  .Arg("Y_scale", "Output tensor quantization scale")
11  .Arg("Y_zero_point", "Output tensor quantization offset")
12  .SetDoc(R"DOC(
13  Creates quantized tensor of type char(byte) with scale and zero point info.
14 )DOC")
15  .Output(0, "Tensor", "An Int8TensorCPU with scale and zero point info")
16  .TensorInferenceFunction(FillerTensorInference<>);
17 
18 OPERATOR_SCHEMA(Int8GivenIntTensorFill)
19  .NumInputs(0)
20  .NumOutputs(1)
21  .Arg("values", "Input array of type int32")
22  .Arg("shape", "Input tensor shape")
23  .Arg("Y_scale", "Output tensor quantization scale")
24  .Arg("Y_zero_point", "Output tensor quantization offset")
25  .SetDoc(R"DOC(
26  Creates quantized tensor of type int32 with scale and zero point info.
27 )DOC")
28  .Output(0, "Tensor", "An Int8TensorCPU with scale and zero point info")
29  .TensorInferenceFunction(FillerTensorInference<>);
30 
31 REGISTER_CPU_OPERATOR(Int8GivenTensorFill, int8::Int8GivenTensorFillOp);
32 REGISTER_CPU_OPERATOR(Int8GivenIntTensorFill, int8::Int8GivenIntTensorFillOp);
33 
34 } // namespace caffe2
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition: blob.h:13