EntryPointNotFoundException with ML.NET's OnnxRuntime

Im trying to use ML.NET to load an onnx model I made for predicting motion sickness in a unity game and I get this mess
EntryPointNotFoundException: OrtGetApiBase assembly:<unknown assembly> type:<unknown type> member:(null)
Microsoft.ML.OnnxRuntime.NativeMethods..cctor () (at <db8a5557c9b54ae7905ea2adba430b5c>:0)
Rethrow as TypeInitializationException: The type initializer for 'Microsoft.ML.OnnxRuntime.NativeMethods' threw an exception.
...
Microsoft.ML.OnnxCatalog.ApplyOnnxModel (Microsoft.ML.TransformsCatalog catalog, System.String[] outputColumnNames, System.String[] inputColumnNames, System.String modelFile, System.Nullable`1[T] gpuDeviceId, System.Boolean fallbackToCpu) (at <23755ae4f3b243f8bebd1b959e7493a8>:0)
SicknessPredictor.Start () (at Assets/SicknessPredictor.cs:85)
EntryPointNotFoundException: OrtGetApiBase assembly:<unknown assembly> type:<unknown type> member:(null)
Microsoft.ML.OnnxRuntime.NativeMethods..cctor () (at <db8a5557c9b54ae7905ea2adba430b5c>:0)
Rethrow as TypeInitializationException: The type initializer for 'Microsoft.ML.OnnxRuntime.NativeMethods' threw an exception.
...
Microsoft.ML.OnnxCatalog.ApplyOnnxModel (Microsoft.ML.TransformsCatalog catalog, System.String[] outputColumnNames, System.String[] inputColumnNames, System.String modelFile, System.Nullable`1[T] gpuDeviceId, System.Boolean fallbackToCpu) (at <23755ae4f3b243f8bebd1b959e7493a8>:0)
SicknessPredictor.Start () (at Assets/SicknessPredictor.cs:85)
according to this I need to load a dll in the "startup project"(in this case Assembly-CSharp) which already has Microsoft.ML.OnnxRuntime.dll in it. would someone know what I should do? Or just be wiling to debug w/ me?
Stack Overflow
EntryPointNotFoundException: Unable to find an entry point named 'O...
I am trying to run an sklearn onnx model in C# 4.8 framework on Windows 10 Pro with VS 2019, I have used the following code using examples in: https://towardsdatascience.com/deploy-sci-kit-learn-mo...
1 Reply
Jill The Something
Jill The SomethingOP10mo ago
Checking the object browser I can see OrtApiBase as part of Microsoft.ML.OnnxRuntime.dll but I guess OrtGetApiBase doesn't exist. OrtApiBase has a GetApi method though... do I just, have the wrong version of the Onnx Runtime? I went and tired some different versions of the runtime, and nothing they still refrence some OrtGetApiBase that doesn't exist isntead of the OrtApiBase.GetApi that does
Want results from more Discord servers?
Add your server