0

In OrtCreateSession it fails trying to load an onnx model with message:

failed:[ShapeInferenceError] Attribute pads has incorrect size

What does it mean? Where do I look for the problem? Thanks for any ideas.

Tullhead
  • 565
  • 2
  • 7
  • 17

1 Answers1

0

The error is coming from one of the convolution or maxpool operators. What this error means is the shape of pads input is not compatible with expected shape for this node.

You can refer to (https://github.com/onnx/onnx/blob/master/docs/Operators.md) to understand the expected size of pads attribute.

Where is this model from? If you got this model from onnx model zoo then please add model name\link here and also add your current onnxruntime version.

Please use https://github.com/microsoft/onnxruntime/issues for this issue.

akhade
  • 26
  • 1
  • The model is one that I created with CNTK and is in use in a commercial product. But now we are simply trying to convert it to ONNX and then use OnnxRuntime in the future - but we get this error. I have no problem getting my OnnxRuntime code to run onnx samples that I find in the Zoo -- but on all my models (created in CNTK) I cannot get it to work. Getting errors like the above. – Tullhead Jun 26 '19 at 19:09
  • Can you share your model? If so please create an issue in the github repo: https://github.com/microsoft/onnxruntime/issues – akhade Jun 27 '19 at 22:09