Errors when loading saved onnx files
See original GitHub issueWe have an issue with saving and loading onnx
files.
When passing the generated quant_model_paths
to get_onnx_runtime_sessions
everything works okay but if I save the file and then run get_onnx_runtime_sessions
on the loaded quantized files the model throws an error:
File "/Users/itai/Code/email-cleaner/.venv/lib/python3.7/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 184, in run
raise ValueError("Model requires {} inputs. Input Feed contains {}".format(num_required_inputs, num_inputs))
ValueError: Model requires 3 inputs. Input Feed contains 2
This doesn’t seem to happen on SageMaker but it happens on mac and also on linux containerized environment.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Error when checking model with external data #3598 - GitHub
I saved a simple model with save_as_external_data=True, then load the model into memory with load_external_data=False, will get an error ...
Read more >OpenCV: Error in loading Net from onnx file - Stack Overflow
I'm trying to load with cv.dnn.readNetFromONNX a pre-trained torch model (U2Net to be precise) saved as onnx . But I'm receiving the error:...
Read more >Troubleshoot - Hugging Face
Troubleshoot. Sometimes errors occur, but we are here to help! This guide covers some of the most common issues we've seen and how...
Read more >Exporting your model to ONNX format - Unity - Manual
Blog post on saving, loading and inferencing from TensorFlow frozen graph. This is a simplified example: First save your TensorFlow to .pd format....
Read more >Import pretrained ONNX network - MathWorks
This MATLAB function imports a pretrained ONNX (Open Neural Network Exchange) network from the file modelfile.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes it does! Thank you very much!
I was facing the same issue - the resolution lies in the order of the quantized model paths. It should be encoder, decoder, init-decoder.