1 #include "caffe2/operators/quantized/int8_flatten_op.h" 3 #include "caffe2/operators/flatten_op.h" 7 REGISTER_CPU_OPERATOR(Int8Flatten, int8::Int8FlattenOp);
9 OPERATOR_SCHEMA(Int8Flatten)
12 .TensorInferenceFunction(TensorInferenceForFlatten)
14 Flattens the input tensor into a 2D matrix. If input tensor has shape 15 (d_0, d_1, ... d_n) then the output will have shape 16 (d_0 X d_1 ... d_(axis-1), d_axis X d_(axis+1) ... X dn) 18 .Input(0, "input",
"A Int8 tensor of rank >= axis.")
22 "A 2D Int8 tensor with the contents of the input tensor, " 23 "with input dimensions up to axis flattened to the outer dimension " 24 "of the output and remaining input dimensions flattened into the inner " 25 "dimension of the output.")
26 .Arg(
"Y_scale",
"Output tensor quantization scale")
27 .Arg(
"Y_zero_point",
"Output tensor quantization offset")
30 "(Default to 1) Indicate up to which input dimensions " 31 "(exclusive) should be flattened to the outer dimension of the output");
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...