Open icodo98 opened 1 month ago
It leaves output shape unknown or stop inferencing when input is
CircleNode
insteadCircleConst
.
When reshape/shape is CircleNode
- use shape_by_input & output_shape would be dynamic
- Example case : reshape(input, shape_node) --> [?, ?, ?]
With principal above, .opt.circle
is different from .tflite
in YamNet
After ShapeInferencePass
output shape of Reshape
will be [?, ?, ?, ?]
.
What
Let's support Shape Inference for determined by input data
Why
There are some operations(ex.
Reshape
,Pad
) which determine output shape by input tensor data. CurrentShapeInference
only allows access to input data when input isCircleConst
. It leaves output shape unknown or stop inferencing when input isCircleNode
insteadCircleConst
. However, there are some operations (ex.PACK
) that determines output data in compile time. Maybe we can inference output shape for these cases.