- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am trying to convert an onnx model generated from Paddle inference to IR.
Openvino version: 2021
Command: python mo.py --input_model "SVTR_Tiny.onnx"
Error:
[ ERROR ] The ExpandDims node p2o.Unsqueeze.0 has more than 1 input
[ ERROR ] The ExpandDims node p2o.Unsqueeze.1 has more than 1 input
[ ERROR ] The ExpandDims node p2o.Unsqueeze.2 has more than 1 input
[ ERROR ] The ExpandDims node p2o.Unsqueeze.3 has more than 1 input
[ ERROR ] The ExpandDims node p2o.Unsqueeze.4 has more than 1 input
[ ERROR ] Cannot infer shapes or values for node "p2o.Unsqueeze.4".
[ ERROR ] Wrong number of inputs to the layer p2o.Unsqueeze.4
[ ERROR ]
[ ERROR ] It can happen due to bug in custom shape infer function <function ExpandDims.infer at 0x0000016E198483A8>.
[ ERROR ] Or because the node inputs have incorrect values/shapes.
[ ERROR ] Or because input shapes are incorrect (embedded to the model or passed via --input_shape).
[ ERROR ] Run Model Optimizer with --log_level=DEBUG for more information.
The model is a transformer-based text recognition model, This model primarily uses Grid_Sampler, which I have replaced with a custom function.
Link for the original model: PaddleOCR/algorithm_rec_svtr_en.md at release/2.5 · PaddlePaddle/PaddleOCR (github.com)
Converted PaddleIR and ONNX(using Paddle2onnx): https://drive.google.com/drive/folders/1lnpgDhDp8FqmBfb9UoKssWZavkF0tfJ3?usp=sharing
Can you please provide a solution for this issue.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Simardeep,
Thanks for reaching out to us.
I’m able to convert your onnx model into Intermediate Represenation using the latest version of OpenVINO™ toolkit. Any opportunity from your end to try the latest version of OpenVINO™ toolkit? The latest version of OpenVINO™ toolkit 2022.1 provides functional bug fixes, and capability changes for the previous 2021.4.2 LTS release.
Regards,
Wan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks a lot for your reply. Moving to v2022 is a great solution but I am working with RPI 4(64 bit) for which a stable release of v22 is not yet present. Hence, I am currently working with v21.
Is there any specific model structure change that could solve this issue?
Regards,
Simardeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Simardeep,
We are investigating this issue, and we will update you at the earliest.
Thank you.
Regards,
Wan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Simardeep,
We've got a reply from the relevant team. There are a few libraries file changes to resolve the issue and it is available in the OpenVINO™ toolkit 2022.1 release. For a stable release, please stay tuned! Else, you can compile the OpenVINO™ toolkit from GitHub.
Regards,
Wan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Simardeep,
Thanks for your question.
This thread will no longer be monitored since we have provided suggestions.
If you need any additional information from Intel, please submit a new question.
Best regards,
Wan

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page