optimizer icon indicating copy to clipboard operation
optimizer copied to clipboard

Pass "eliminate_consecutive_idempotent_ops" succeeds but model gives an incompatible shape error upon run.

Open researcher-no-name opened this issue 7 months ago • 0 comments
trafficstars

While optimizing a number of Mask and Faster R-CNN models on opset=12 from the ONNX Model Hub, the optimizer generated the models, but I encountered the following error when applying the eliminate_consecutive_idempotent_ops error when I run them:

[ONNXRuntimeError] : 1 : FAIL : Node (<NODE>) Op (Reshape) [ShapeInferenceError] Dimension could not be inferred: incompatible shapes

Where <NODE> is: 2953 for the Mask models: Mask R-CNN R-50-FPN-int8, Mask R-CNN R-50-FPN-qdq, Mask R-CNN R-50-FPN-fp32. 2794 for the Faster models: Faster R-CNN R-50-FPN-int8, Faster R-CNN R-50-FPN-qdq, and Faster R-CNN R-50-FPN-fp32.

The original models run without problems. By visual inspection using Netron, I believe something is mishandled with the concatenation operations preceding these nodes in the models.

researcher-no-name avatar Mar 19 '25 19:03 researcher-no-name