- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Team,
I try to optimize the custom pytorch model using openvino model optimizer.
First I convert the pytorch model into ONNX format. Then I try to optimize the model using openvino toolkit.
convert from pytorch to ONNX input parameter:
input shape = [1,640,640,3]
batch = 1
convert ONNX to IR(xml,bin) input parameter:
input shape = [1,640,640,3]
Error:
[ ERROR ] Concat input shapes do not match
[ ERROR ] Shape is not defined for output 0 of "Concat_4".
[ ERROR ] Cannot infer shapes or values for node "Concat_4".
[ ERROR ] Not all output shapes were inferred or fully defined for node "Concat_4".
For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #40.
[ ERROR ]
[ ERROR ] It can happen due to bug in custom shape infer function <function concat_infer at 0x00000237F20939D8>.
[ 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 "Concat_4" 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.
As per this error log I verified the input shape of the model as input parameter. Both pytorch,onnx shape is equal.
I searched in the intel community form for similar issue,I got the below mentioned link.
I try to solve the issue by our custom model.I couldn't able to solve this issue.I have attached the full error log and custom code for your reference.
Attached File Details:
Error Log in Debug mode : concat_4_error_log.txt
Code for custom concat function :
custom files.zip
common.py - contains concat function
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vishnu,
Is your custom model based on YoloV5 architecture?
OpenVINO officially supports YoloV1, YoloV2 and YoloV3 only.
YoloV5 is not officially supported by OpenVINO.
Moreover, GhostNet using PyTorch is not supported officially by OpenVINO.
Details about supported PyTorch models are available at the
Regards,
Munesh
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vishnu,
Is your custom model based on YoloV5 architecture?
OpenVINO officially supports YoloV1, YoloV2 and YoloV3 only.
YoloV5 is not officially supported by OpenVINO.
Moreover, GhostNet using PyTorch is not supported officially by OpenVINO.
Details about supported PyTorch models are available at the
Regards,
Munesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vishnu,
This thread will no longer be monitored since we have provided a solution. If you need any additional information from Intel, please submit a new question.
Regards,
Munesh
![](/skins/images/D2683F18326913BBA0436CB7114DD569/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page