ONNX Runtime is a cross-platform inference and training machine-learning accelerator.
Questions tagged [onnxruntime]
292 questions
1
vote
1 answer
Difference between WinML and OnnxRuntime for WPF in C#
To package trained Onnx models with a WPF .Net Core 3.1 app, I'm wondering if there are any difference to these two methods: Microsoft.ML.OnnxRuntime and Microsoft.AI.MachineLearning (WinML)? OnnxRuntime seems to be easier to implement with C# while…

Lola
- 68
- 4
1
vote
1 answer
Issue when converting ONNX model to Caffe2
I converted a TF model to ONNX and then ONNX model to Caffe2. The conversion happened successfully. However, I am getting a RunTime Error when trying to load and infer from the obtained model.
This is the error that I am receiving. How do I add the…

ranka47
- 995
- 8
- 25
1
vote
1 answer
Unsupported ONNX opset version: 11
I'm following this guide to convert darknet to onnx. However, I'm facing the following error:
"C:\Users\Scott\Anaconda3\envs\pytorch_yolov4\lib\site-packages\torch\onnx\symbolic_helper.py",
line 253, in _set_opset_version
raise…

Scott
- 4,974
- 6
- 35
- 62
1
vote
1 answer
How to create ONNXTensor for a single float value?
I have the following java code :
try (OrtEnvironment env = OrtEnvironment.getEnvironment();
OrtSession.SessionOptions opts = new OrtSession.SessionOptions()) {
…

Prog_G
- 1,539
- 1
- 8
- 22
1
vote
1 answer
Throw exception 'cuDNN failure 8: CUDNN_STATUS_EXECUTION_FAILED' in training ONNX's pretrained model Emotion FerPlus
I am testing to train Emotion FerPlus emotion recognition model.
Training has cuDNN failure 8: CUDNN_STATUS_EXECUTION_FAILED error.
I am using Nvidia GPU TitanRTX 24G.
Then change the minibatch_size from 32 to 1. But still have error.
I am using…

batuman
- 7,066
- 26
- 107
- 229
1
vote
1 answer
Module 'onnxruntime' has no attribute 'OrtValue'
I'm new to python and the onnxruntime. I have successfully managed to do inferencing. I'm currently trying to direct an inference instance to a specific gpu on my system via IObinding. I'm receiving the following error when attempting to create an…

ADD1
- 11
- 3
1
vote
0 answers
Unable to "set_base_margin" and "predict with model's best_ntree_limit" using ONNX runtime to do prediction on XGBoost model
I have converted a XGBoost model into an ONNX model using onnxmltools.
However, when I was trying to perform prediction using ONNX runtime, I have 2 issues.
In XGBoost API, DMatrix has a "set_base_margin" function, which initializes the output with…

Kael Xu
- 111
- 1
- 3
1
vote
1 answer
onnxruntime: cannot import name 'get_all_providers'
Trying to import onnxruntime in a Jupiter notebook with python 3.6.3 on macOS.
I get the following error on import:
import onnxruntime
ImportError
Traceback (most recent call last)
in…

Fab
- 1,745
- 2
- 8
- 11
1
vote
2 answers
Trouble building onnxruntime from source - FileNotFoundError
I am trying to build onnxruntime from source, but I run into the following problem.
After executing
git clone https://github.com/microsoft/onnxruntime.git
cd onnxruntime
./build.bat
I run into the following error
2020-08-31 11:14:05,414 Build…

Joseph Konan
- 666
- 2
- 8
- 18
1
vote
1 answer
Converted ONNX model runs on CPU but not on GPU
I converted a TensorFlow Model to ONNX using this command:
python -m tf2onnx.convert --saved-model tensorflow-model-path --opset 10 --output model.onnx
The conversion was successful and I can inference on the CPU after installing onnxruntime.
But…

oezguensi
- 930
- 1
- 12
- 23
1
vote
4 answers
How to merge two ONNX deep learning models
I have two models that are in ONNX format. Both models are similar (both are pre-trained deep learning models, ex. ResNet50 models). The only difference between them is that the last layers are optimized/retrained for different data sets.
I want to…

Walid Hanafy
- 1,429
- 2
- 14
- 26
1
vote
1 answer
Onnx model conversion with mutiple input types
I know that there are not many experts out there that can help with this issue, but we are having some trouble trying to convert an XGBoost ML model to an ONNX ML Model.
When converting with a single input type everything seems to go fine, but when…

Almo Daved
- 13
- 4
1
vote
2 answers
Onnxruntime Test Error after Successfully Converting Midas Model to ONNX
Finally, I ask my first question. I've been struggling the past few days with this and couldn't find the same question here.
I converted this pretrained model to ONNX with this following codes:
import torch
from midas import midas_net
import…

blaublue
- 11
- 2
1
vote
1 answer
Unexpected model output running Onnx model in Unity using Barracuda
Context
I am trying to use a pre-trained model in ONNX format to do inference on image data in Unity. The model is linked to the executing component in Unity as an asset called modelAsset. I am using Barracuda version 1.0.0 for this and executing…

Rens van der Veldt
- 39
- 10
1
vote
1 answer
How to generate C API for onnxruntime on Linux
I am trying to build onnxruntime from source on Linux. According to this instruction I have successfully built python wheels and shared libs. But I have not seen headers for C API.
There is a build option --build_csharp which seems to enable C#/C…

lee670523
- 21
- 2