onnxcli icon indicating copy to clipboard operation
onnxcli copied to clipboard

[infershape] should be able to set tensor shapes - inputs and others

Open zhenhuaw-me opened this issue 1 year ago • 0 comments

infershape is not very useful if the input shapes are symbolics (dynamic shapes). If the user can set input shapes, it's more powerful:

  • If set to static shapes, the shape of the model will be known.
  • Even for symbolics, the user can update the input shapes.

The setup should be optional, and can extend to all the tensors in the model (excluding shape op related).

Interface should be something like below.

onnx infershape path/to/input/model.onnx path/to/output/model.onnx --tensor-shape t1:[d0,d1] t2:[d0,d1,d3]

zhenhuaw-me avatar Aug 25 '22 12:08 zhenhuaw-me