models
models copied to clipboard
Some Models failed to pass onnxruntime_test_python_symbolic_shape_infer.py
Bug Report
SSD-MobilenetV1 with opset10 and opset12
call stack
FAIL: test_symbolic_shape_infer (__main__.TestSymbolicShapeInference)
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\git\onnxruntime\build\Windows\RelWithDebInfo\RelWithDebInfo\onnxruntime_test_python_symbolic_shape_infer.py", line 47, in test_symbolic_shape_infer
SymbolicShapeInference.infer_shapes(
File "D:\programs\Continuum\anaconda3\envs\onnxruntime\lib\site-packages\onnxruntime\tools\symbolic_shape_infer.py", line 2080, in infer_shapes
all_shapes_inferred = symbolic_shape_inference._infer_impl()
File "D:\programs\Continuum\anaconda3\envs\onnxruntime\lib\site-packages\onnxruntime\tools\symbolic_shape_infer.py", line 1909, in _infer_impl
self.dispatcher_[node.op_type](node)
File "D:\programs\Continuum\anaconda3\envs\onnxruntime\lib\site-packages\onnxruntime\tools\symbolic_shape_infer.py", line 743, in _infer_Concat
assert 0 == get_attribute(node, 'axis')
AssertionError
cc @snnn
opset12 Inception-1-int8
call stack
FAIL: test_symbolic_shape_infer (__main__.TestSymbolicShapeInference)
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\git\onnxruntime\build\Windows\RelWithDebInfo\RelWithDebInfo\onnxruntime_test_python_symbolic_shape_infer.py", line 47, in test_symbolic_shape_infer
SymbolicShapeInference.infer_shapes(
File "D:\programs\Continuum\anaconda3\envs\onnxruntime\lib\site-packages\onnxruntime\tools\symbolic_shape_infer.py", line 2080, in infer_shapes
all_shapes_inferred = symbolic_shape_inference._infer_impl()
File "D:\programs\Continuum\anaconda3\envs\onnxruntime\lib\site-packages\onnxruntime\tools\symbolic_shape_infer.py", line 1909, in _infer_impl
self.dispatcher_[node.op_type](node)
File "D:\programs\Continuum\anaconda3\envs\onnxruntime\lib\site-packages\onnxruntime\tools\symbolic_shape_infer.py", line 1079, in _infer_Pool
sympy_shape = self._compute_conv_pool_shape(node)
File "D:\programs\Continuum\anaconda3\envs\onnxruntime\lib\site-packages\onnxruntime\tools\symbolic_shape_infer.py", line 566, in _compute_conv_pool_shape
assert len(sympy_shape) == rank + 2
AssertionError
opset12 SSD-int8
======================================================================
ERROR: test_symbolic_shape_infer (__main__.TestSymbolicShapeInference)
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\git\onnxruntime\build\Windows\RelWithDebInfo\RelWithDebInfo\onnxruntime_test_python_symbolic_shape_infer.py", line 47, in test_symbolic_shape_infer
SymbolicShapeInference.infer_shapes(
File "D:\programs\Continuum\anaconda3\envs\onnxruntime\lib\site-packages\onnxruntime\tools\symbolic_shape_infer.py", line 2083, in infer_shapes
raise Exception("Incomplete symbolic shape inference")
Exception: Incomplete symbolic shape inference
----------------------------------------------------------------------
SSD-MobilenetV1-12-int8 opset12
Traceback (most recent call last):
File "c:\git\onnxruntime\build\Windows\RelWithDebInfo\RelWithDebInfo\onnxruntime_test_python_symbolic_shape_infer.py", line 47, in test_symbolic_shape_infer
SymbolicShapeInference.infer_shapes(
File "D:\programs\Continuum\anaconda3\envs\onnxruntime\lib\site-packages\onnxruntime\tools\symbolic_shape_infer.py", line 2080, in infer_shapes
all_shapes_inferred = symbolic_shape_inference._infer_impl()
File "D:\programs\Continuum\anaconda3\envs\onnxruntime\lib\site-packages\onnxruntime\tools\symbolic_shape_infer.py", line 1909, in _infer_impl
self.dispatcher_[node.op_type](node)
File "D:\programs\Continuum\anaconda3\envs\onnxruntime\lib\site-packages\onnxruntime\tools\symbolic_shape_infer.py", line 1593, in _infer_Squeeze
axes = [handle_negative_axis(a, len(input_shape)) for a in axes]
File "D:\programs\Continuum\anaconda3\envs\onnxruntime\lib\site-packages\onnxruntime\tools\symbolic_shape_infer.py", line 1593, in <listcomp>
axes = [handle_negative_axis(a, len(input_shape)) for a in axes]
File "D:\programs\Continuum\anaconda3\envs\onnxruntime\lib\site-packages\onnxruntime\tools\symbolic_shape_infer.py", line 71, in handle_negative_axis
assert axis < rank and axis >= -rank
AssertionError
I think this issue belongs to ONNX Runtime because this symbolic_shape_infer.py use a different approach of shape inference which is not a part of ONNX. The error might be because the model was wrong, or the script needs be improved.