Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6392 Discussions

Exception occurred during running replacer "REPLACEMENT_ID"

EBBIAV
Beginner
383 Views

I already had a look at this very similar issue, unfortunately the solution did not work out for me.

 

My model is also developed in pytorch and has two inputs. When I convert from ONNX to Openvino 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

My setup is like this:  

torch.onnx.export(
model,
(dummy_input_faces, dummy_input_face_marks),
f'{OUTPUT_DIR.as_posix()}/{model.__class__.__name__}.onnx',
input_names=["0", "1"],
opset_version=9,
do_constant_folding=True
)

# Get the path to the Model Optimizer script
mo_path = str(Path(mo_onnx.__file__))
# Construct the command for Model Optimizer
print(OUTPUT_DIR / model.__class__.__name__)
mo_command = f""""{sys.executable}"
"{mo_path}"
--input_model "{OUTPUT_DIR / model.__class__.__name__}.onnx"
--input "0,1"
--input_shape "(1,256,256,3), (1,68,2)"
--data_type FP16
--output_dir "{OUTPUT_DIR}"
"""

 

This is what the above command returns:

Model Optimizer arguments:
Common parameters:
- Path to the Input Model: C:\Users\I008619\Projects\depth_ai\conversion\outputs\PreprocessAnon.onnx
- Path for generated IR: C:\Users\I008619\Projects\depth_ai\conversion\outputs
- IR output name: PreprocessAnon
- Log level: ERROR
- Batch: Not specified, inherited from the model
- Input layers: 0,1
- Output layers: Not specified, inherited from the model
- Input shapes: (1,256,256,3), (1,68,2)
- Mean values: Not specified
- Scale values: Not specified
- Scale factor: Not specified
- Precision of IR: FP16
- 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:\Users\I008619\.virtualenvs\openvino_env\lib\site-packages\openvino
Inference Engine version: 2021.4.0-3839-cd81789d294-releases/2021/4
Model Optimizer version: 2021.4.0-3839-cd81789d294-releases/2021/4
[ ERROR ] Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.front.user_data_repack.UserDataRepack'>): No node with name 0

 

Can anyone help me with this? I could also share the ONNX model if needed.

0 Kudos
1 Reply
Zulkifli_Intel
Moderator
366 Views

Hello Enrico,


We noticed that this is a duplicated case. We will close this thread. If you need any additional information from Intel, please submit a new question.


Sincerely,

Zulkifli


0 Kudos
Reply