- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am currently unable to convert a Pytorch model with two inputs to IR. When I try to convert from ONNX to IR I get the following error:
[ ERROR ] Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.front.user_data_repack.UserDataRepack'>): No node with name 0
As argument for the model optimizer is use the input names 0,1 as suggested in another post:
--input "0,1"
For the conversion to ONNX I use the following arguments:
torch.onnx.export(
model,
(input1, input2),
f'outputdir/model.onnx',
input_names=["0", "1"],
opset_version=9,
do_constant_folding=True
)
Do you know why this happens?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ebbiav,
Thank you for reaching out to us!
The error you encountered: “No node name with 0” was due to Model Optimizer tried to access a node that does not exist. This could happen if you have incorrectly specified placeholder, input, or output node names.
Could you please check the input nodes of your ONNX model with Netron?
If the input nodes are 0 and 1, please share your PyTorch model, conversion scripts, and conversion command with us for further investigation.
Regards,
Wan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Wan,
Thanks for your reply!
I checked it with Netron. While my output names seem to be correctly, I cannot find the names of the input nodes (see picture below).
This is my current script for onnx conversion:
torch.onnx.export(
model,
(input1, input2),
f'{OUTPUT_DIR.as_posix()}/{model.__class__.__name__}.onnx',
input_names=["0", "1"],
output_names=["anon_faces", "affin_matrices"],
opset_version=9,
do_constant_folding=True
)
I can also send other information, if that would help.
Regards,
Enrico
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The problem seems to be due to a numpy conversion of the tensor in the model. Thus, this post can be closed. Thanks for you help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ebbiav,
Thanks for your question.
We noticed that you would like to close this post.
If you need any additional information from Intel, please submit a new question.
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