Caffe2 - C++ API
A deep learning, cross platform ML framework
int8_reshape_op.cc
1 #include "caffe2/operators/quantized/int8_reshape_op.h"
2 
3 namespace caffe2 {
4 
5 REGISTER_CPU_OPERATOR(Int8Reshape, int8::Int8ReshapeOp);
6 
7 OPERATOR_SCHEMA(Int8Reshape)
8  .NumInputs(1, 2)
9  .NumOutputs(2)
10  .AllowInplace({{0, 0}})
11  .SetDoc(R"DOC(
12 Reshape the input tensor similar to numpy.reshape.
13 
14 It takes a tensor as input and an optional tensor specifying the new shape.
15 When the second input is absent, an extra argument `shape` must be specified.
16 It outputs the reshaped tensor as well as the original shape.
17 
18 At most one dimension of the new shape can be -1. In this case, the value is
19 inferred from the size of the tensor and the remaining dimensions. A dimension
20 could also be 0, in which case the actual dimension value is going to be copied
21 from the input tensor.
22 )DOC")
23  .Arg("shape", "New shape")
24  .Arg("Y_scale", "Output tensor quantization scale")
25  .Arg("Y_zero_point", "Output tensor quantization offset")
26  .Input(0, "data", "An input tensor.")
27  .Input(1, "new_shape", "New shape.")
28  .Output(0, "reshaped", "Reshaped data.")
29  .Output(1, "old_shape", "Original shape.");
30 
31 } // namespace caffe2
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition: blob.h:13