Error on running Super Resolution Model from ONNX
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 9.8k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
Testing ONNX model for super resolution model, I have error running this sample program.
My ONNX version is 1.5.0 with onnxruntime 1.4.0. Onnxruntime was installed using pip. Pytorch version is 1.6.0
Error is at
ort_session = onnxruntime.InferenceSession('/home/itc/pytorch/sub_pixel_cnn_2016/model/super-resolution-10.onnx')
The error is in loading onnx model.
Traceback (most recent call last):
File "test.py", line 73, in <module>
ort_session = onnxruntime.InferenceSession('/home/itc/pytorch/sub_pixel_cnn_2016/model/super-resolution-10.onnx')
File "/home/itc/pytorch/lib/python3.7/site-packages/onnxruntime/capi/session.py", line 158, in __init__
self._load_model(providers or [])
File "/home/itc/pytorch/lib/python3.7/site-packages/onnxruntime/capi/session.py", line 166, in _load_model
True)
RuntimeError: /onnxruntime_src/onnxruntime/core/session/inference_session.cc:238 onnxruntime::InferenceSession::InferenceSession(const onnxruntime::SessionOptions&, const onnxruntime::Environment&, const string&) status.IsOK() was false. Given model could not be parsed while creating inference session. Error message: Protobuf parsing failed.
How can I solve the error?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with dependencies/Run_Super_Resolution_Model.ipynb and reproduce the failing onnxruntime.InferenceSession call using the stated ONNX, onnxruntime, and PyTorch versions. Inspect the referenced super-resolution-10.onnx model and the loading error; done means the sample loads the model without the Protobuf parsing failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100