Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSD-MobilenetV1 fails with the latest onnx.shape_inference due to If in subgraph #628

Open
jcwchen opened this issue Oct 24, 2023 · 0 comments
Labels

Comments

@jcwchen
Copy link
Member

jcwchen commented Oct 24, 2023

Bug Report

Which model does this pertain to?

SSD-MobilenetV1: https://github.com/onnx/models/blob/main/vision/object_detection_segmentation/ssd-mobilenetv1/model/ssd_mobilenet_v1_10.onnx

Describe the bug

Failed with the latest onnx as:

2023-08-28T00:24:37.5488680Z Downloading SSD-MobilenetV1 to local path /Users/runner/.cache/onnx/hub/vision/object_detection_segmentation/ssd-mobilenetv1/model/1fbcf47654165f2e0b5f1bdf3f123b9e9e1128cd6463717767b76ab4b5246f9a_ssd_mobilenet_v1_10.onnx
2023-08-28T00:24:37.5489340Z [PASS]: SSD-MobilenetV1 is checked by onnx checker with shape_inference. 
2023-08-28T00:24:37.5490300Z [FAIL]: [ShapeInferenceError] Inference error(s): (op_type:Loop, node name: generic_loop_Loop__48): [ShapeInferenceError] Inference error(s): (op_type:If, node name: Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/cond_If__115): [ShapeInferenceError] Inference error(s): (op_type:Concat, node name: Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/cond/concat): [ShapeInferenceError] All inputs to Concat must have same rank. Input 1 has rank 1 != 2

after the enhancement from ONNX: onnx/onnx#5488.

Reproduction instructions

System Information

OS Platform and Distribution (e.g. Linux Ubuntu 16.04): ubuntu-22.04
ONNX version (e.g. 1.6): latest (upcoming 1.5.0)
Backend/Runtime version (e.g. ONNX Runtime 1.1, PyTorch 1.2): N/A

Provide a code snippet to reproduce your errors.

import onnx
model = onnx.load('model.onnx')
inferred = onnx.shape_inference.infer_shapes(model, strict_mode=True)
...

Notes

Since ONNX Model Zoo will deprecate these ancient models #616, we can also consider just remove this if the direct fix is difficult, because we have a correct newer model already (opset_version 12 instead of 10): ssd_mobilenet_v1_12.onnx.

@jcwchen jcwchen added the bug label Oct 24, 2023
github-merge-queue bot pushed a commit to onnx/onnx that referenced this issue Oct 24, 2023
)

### Description
<!-- - Describe your changes. -->
Skip ssd_mobilenet_v1 due to recent subgraph shape inference
enhancement.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve? -->
<!-- - If it fixes an open issue, please link to the issue here. -->
The CI of `Weekly CI with the latest ONNX and ONNX Model Zoo` started
failing after Aug 27 (passed on Aug 20) probably due to this sugraph
shape inference enhancement: #5488
(merged on Aug 21).

The root cause is track in Model Zoo repo:
onnx/models#628 and will be fixed there. For
now we can just skip this test in ONNX repo.

cc @gramalingam since we have discussed it yesterday.

---------

Signed-off-by: Chun-Wei Chen <[email protected]>
isdanni pushed a commit to isdanni/onnx that referenced this issue Nov 2, 2023
…nx#5700)

### Description
<!-- - Describe your changes. -->
Skip ssd_mobilenet_v1 due to recent subgraph shape inference
enhancement.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve? -->
<!-- - If it fixes an open issue, please link to the issue here. -->
The CI of `Weekly CI with the latest ONNX and ONNX Model Zoo` started
failing after Aug 27 (passed on Aug 20) probably due to this sugraph
shape inference enhancement: onnx#5488
(merged on Aug 21).

The root cause is track in Model Zoo repo:
onnx/models#628 and will be fixed there. For
now we can just skip this test in ONNX repo.

cc @gramalingam since we have discussed it yesterday.

---------

Signed-off-by: Chun-Wei Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant