Samsung / ONE

On-device Neural Engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[circle-interpreter] Need a way to infer output shape

shs-park opened this issue · comments

What

  • In circle-interpreter,
  • Let's support getting the corresponding output value, when output shape inference is possible

Why

  • Some circle models have dynamic output shapes, such as <2x2x?xf32>, where the ? value is not decided yet.
  • While interpreting those models with specific input value, there are some cases that output shapes can be inferred.
  • Currently, such shape inference is not available in circle-interpreter, which generates 0 size of output result.

Expect

  • Generates correct output file

I uploaded the related .circle model

In this model, the output shape of StridedSlice operation is dynamic <2x2x?xf32>
Note that ? could be represented as -1 or 1, depend on model viewers

Model download : Slice_F32_R3_nc_1.zip

image

Close as all related PRs are merged into the master branch.
The output file is now generated by circle-interpreter correctly with the model.