A repository for storing models that have been inter-converted between various frameworks. Supported frameworks are TensorFlow, PyTorch, ONNX, OpenVINO, TFJS, TFTRT, TensorFlowLite (Float32/16/INT8), EdgeTPU, CoreML.
Can you guide me through the procedure for converting CreStereo PyTorch model to Onnx model.?
As per the documents, it says
You need to convert the model twice, once without the init_flow and once with the init_flow. So the commented out part in your script are not options, but two separate runs.
Then use the merging tool PINTO0309 developed to merge the two parts into one. Or, just use them separately in sequence.
But in the second step while using onnx_merge.py ,
i am facing the issue attached in the below error log
Relevant Log Output
Traceback (most recent call last):
File "onnx_merge.py", line 17, in <module>
combined_model = onnx.compose.merge_models(
File "/home/virtual_environments/cre_pytorch/lib/python3.8/site-packages/onnx/compose.py", line 363, in merge_models
graph = merge_graphs(
File "/home/virtual_environments/cre_pytorch/lib/python3.8/site-packages/onnx/compose.py", line 187, in merge_graphs
raise ValueError(f"Input {g2_in_name} is not present in g2")
ValueError: Input next_flow_init is not present in g2
URL or source code for simple inference testing code
Issue Type
Support
OS
Ubuntu
OS architecture
x86_64
Programming Language
Python
Framework
PyTorch, ONNX
Model name and Weights/Checkpoints URL
https://github.com/PINTO0309/PINTO_model_zoo/tree/main/284_CREStereo
Description
Hi, Thank you for your great work.
Can you guide me through the procedure for converting CreStereo PyTorch model to Onnx model.? As per the documents, it says You need to convert the model twice, once without the init_flow and once with the init_flow. So the commented out part in your script are not options, but two separate runs. Then use the merging tool PINTO0309 developed to merge the two parts into one. Or, just use them separately in sequence.
But in the second step while using onnx_merge.py ,
i am facing the issue attached in the below error log
Relevant Log Output
URL or source code for simple inference testing code
No response