jiangjiajun / PaddleUtils

Some tools to operate PaddlePaddle model
Apache License 2.0
71 stars 26 forks source link

onnx shape infer fail!would you please help to take a look at this issue. #2

Open aiden-zhang opened 1 year ago

aiden-zhang commented 1 year ago

the model of ppocr_rec.onnx is covert from https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_infer.tar

I run the following cmd: python PaddleUtils/onnx/onnx_infer_shape.py --input ppocr_rec.onnx --output new_model.onnx ======= [[-1, 120], [-1]] p2o.Concat.0 0 Traceback (most recent call last): File "PaddleUtils/onnx/onnx_infer_shape.py", line 2121, in args.guess_output_rank, args.verbose) File "PaddleUtils/onnx/onnx_infer_shape.py", line 2084, in infer_shapes all_shapes_inferred = symbolic_shape_inference._infer_impl() File "PaddleUtils/onnx/onnx_infer_shape.py", line 1913, in _inferimpl self.dispatchernode.op_type File "PaddleUtils/onnx/onnx_infer_shape.py", line 1305, in _infer_Reshape assert new_sympy_shape.count(-1) < 2 AssertionError