Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.middle.PartialInfer.PartialInfer'>): Stopped shape/value propagation at "Unsqueeze_254" node. #4

Open
munkeops opened this issue Sep 29, 2021 · 1 comment

Comments

@munkeops
Copy link

Hey so i did the exact thing as what you mentioned but , faced the above issue, attaching logs -

Model Optimizer arguments:
Common parameters:
- Path to the Input Model: C:\Users\Rohan\Desktop\openvinotesting\yolov5s.onnx
- Path for generated IR: C:\Users\Rohan\Desktop\openvinotesting\yolov5_onnx
- IR output name: yolov5s
- Log level: ERROR
- Batch: Not specified, inherited from the model
- Input layers: Not specified, inherited from the model
- Output layers: Not specified, inherited from the model
- Input shapes: Not specified, inherited from the model
- Mean values: Not specified
- Scale values: Not specified
- Scale factor: Not specified
- Precision of IR: FP32
- Enable fusing: True
- Enable grouped convolutions fusing: True
- Move mean values to preprocess section: None
- Reverse input channels: False
ONNX specific parameters:
- Inference Engine found in: C:\Program Files (x86)\Intel\openvino_2021\python\python3.8\openvino
Inference Engine version: 2021.4.1-3926-14e67d86634-releases/2021/4
Model Optimizer version: 2021.4.1-3926-14e67d86634-releases/2021/4
[ ERROR ] The ExpandDims node Unsqueeze_254 has more than 1 input
[ ERROR ] The ExpandDims node Unsqueeze_256 has more than 1 input
[ ERROR ] The ExpandDims node Unsqueeze_258 has more than 1 input
[ ERROR ] The ExpandDims node Unsqueeze_293 has more than 1 input
[ ERROR ] The ExpandDims node Unsqueeze_307 has more than 1 input
[ ERROR ] The ExpandDims node Unsqueeze_309 has more than 1 input
[ ERROR ] The ExpandDims node Unsqueeze_311 has more than 1 input
[ ERROR ] The ExpandDims node Unsqueeze_346 has more than 1 input
[ ERROR ] The ExpandDims node Unsqueeze_360 has more than 1 input
[ ERROR ] The ExpandDims node Unsqueeze_362 has more than 1 input
[ ERROR ] The ExpandDims node Unsqueeze_364 has more than 1 input
[ ERROR ] The ExpandDims node Unsqueeze_399 has more than 1 input
[ ERROR ] Cannot infer shapes or values for node "Unsqueeze_254".
[ ERROR ] Wrong number of inputs to the layer Unsqueeze_254
[ ERROR ]
[ ERROR ] It can happen due to bug in custom shape infer function <function ExpandDims.infer at 0x000001E4FEB3D280>.
[ 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 "Unsqueeze_254" node.
For more information please refer to Model Optimizer FAQ, question #38. (https://docs.openvinotoolkit.org/latest/openvino_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html?question=38#question-38)

the link mentioned here dosent really explain the issue. Trying this on a window machine, tried it with direct installation as well as docker image.

the link here - openvinotoolkit/openvino#1287 mentions that yolov5 is not supported and hence the issue.

I did try to export the pt file to pb instead and then did the conversion, the results were absolutely bad.

Let me know what you think about this issue

@SamSamhuns
Copy link
Owner

Hey, thanks for bringing this up. Looks like, as of the latest commits on the yolov5 repo, the openvino exports do not work and report the same error as you state above. I was able to recreate the issue as it looks like openvino does not support some updated operations on the yolov5 repo.

For now, the openvino exports with the commits as of Aug 16, 2021, as I have tested it on the google colab which is present there. The simple temporary fix before openvino supports yolov5 fully would be to use the old commits. i.e.

$ git clone https://github.com/ultralytics/yolov5                    # clone repo
$ cd yolov5
$ git reset --hard f3e3f7603fca56e52f3f055d8bbb5847a73e3e78          # commit id for commit as of Aug 16, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants