- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have trained a model on custom dataset using YOLOV5L weights on pytorch framework and then i exported the pytorch model to an .onnx model. Now that i try to convert this onnx model to openvino IR model , it is showing me the following errors :
[ ERROR ] Cannot infer shapes or values for node "Resize_242".
[ ERROR ] operands could not be broadcast together with shapes (4,) (0,)
[ ERROR ]
[ ERROR ] It can happen due to bug in custom shape infer function <function UpsampleOp.upsample_infer at 0x0000012F1C41C5E8>.
[ 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.
[ ERROR ] Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.middle.PartialInfer.PartialInfer'>): Stopped shape/value propagation at "Resize_242" node.
For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #38.
Following was the command i used :
"C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer\mo.py" --input_model last_yolov5l_results_416.onnx --input_shape [1,3,416,416]
Also, is there a way to skip any layer in the network?
After this, I reinstalled the latest openvino toolkit version and did the same operation and now I'm getting this error :
- Tags:
- ONNX
- openvino IR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @rohan
YOLOv5 is currently not an officially supported topology by OpenVINO toolkit. Please see the list of validated ONNX and PyTorch topologies here https://docs.openvinotoolkit.org/latest/openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_ONNX.html
As indicated on the picture you attached, you model uses Resize Opset-12 operation that is not supported by Model Optimizer to convert (as well as Resize Opset-11). However, as possible workaround you can try to use other PyTorch resize-like operation and convert the model with Resize Opset-10 operation which is supported.
Hope this helps.
Best regards, Max.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @rohan
YOLOv5 is currently not an officially supported topology by OpenVINO toolkit. Please see the list of validated ONNX and PyTorch topologies here https://docs.openvinotoolkit.org/latest/openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_ONNX.html
As indicated on the picture you attached, you model uses Resize Opset-12 operation that is not supported by Model Optimizer to convert (as well as Resize Opset-11). However, as possible workaround you can try to use other PyTorch resize-like operation and convert the model with Resize Opset-10 operation which is supported.
Hope this helps.
Best regards, Max.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thankyou so much for your review. Is there any way in openvino to convert the model with Resize Opset-10 operation or do i need to do it from any other source?
Also, there is a folder named "extension_generator", that should be present in the installation directory of openvino, but i don't have it. How to get it?

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