onnxruntime
onnxruntime copied to clipboard
Update symbolic_shape_infer.py
trafficstars
Description
Return empty array instead of None. Since the results of these methods are fed into loops returning None causes a crash in these situations.
Motivation and Context Script for making a .onnx file ready for TensorRT was failing for quantized models. Maybe a fix for https://github.com/microsoft/onnxruntime/issues/12173
@stevenlix can you provide some details about the failures you encountered when testing this PR?
One of our internal models failed with the PR changes. The error message is, File "symbolic_shape_infer.py", line 32, in is_sequence assert cls_type in ["tensor_type", "sequence_type"] AssertionError