question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

custom_models convert error - `Cannot infer shapes or values for node "If_38"`

See original GitHub issue

I wanted to implement custom_model according to your instructions, but the following error occurred when converting to openvino

How did you solve it, could you help me?

[ ERROR ]  Cannot infer shapes or values for node "If_38".
[ ERROR ]  There is no registered "infer" function for node "If_38" with op = "If". Please implement this function in the extensions. 
 For more information please refer to Model Optimizer FAQ, question #37. (https://docs.openvinotoolkit.org/latest/openvino_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html?question=37#question-37)
[ ERROR ]  
[ ERROR ]  It can happen due to bug in custom shape infer function <UNKNOWN>.
[ 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 "If_38" 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)

image

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
geaxgxcommented, Nov 18, 2021

Thank you. I was able to reproduce the issue by using the same versions as you. A short term workaround is to downgrade torch. I am using: torch 1.9.0 torchvision 0.10.0

0reactions
Undertaker7533967commented, Dec 15, 2022

Dear geaxgx:

We are bad to create this issue on the wrong title. and thanks for your latest repo. we will git pull or download it again. By the way, we seem to find out depthai version is must be lower than 2.19.1.0 We have testing 2.13 or 2.15 with hand tracker. there is no any problem and running very smoothly.

all the best~~

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Error] Cannot infer shapes or values for node ... - GitHub
I have trained efficientdet-d0 (tensorflow) model. I am trying to convert it to IR. My command is : python mo_tf.py --saved_model_dir D:\rough\ ...
Read more >
Model Optimizer: Cannot infer shapes or values for node issue
Hello, I am attempting to optimize my resnet50 model from AWS. I keep receiving the following issue when trying to produce the IR....
Read more >
MatMul wasn't able to infer shape because input dimensions ...
I am running OpenVINO optimization on a frozon .pb model file. While running the the optimization, it shows the following error messages: E0806 ......
Read more >
Troubleshooting the Model Optimizer - AWS DeepLens
The model optimizer can't infer shapes or values for the specified node because: the inference function has a bug, the input nodes have...
Read more >
Model Optimizer Frequently Asked Questions
Model Optimizer cannot infer shapes or values for the specified node. It can happen because of a bug in the custom shape infer...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found