I'm trying to use MS's onnx runtime packages on a project for the ML2. I'm using ORT becuase barracuda doesn't work for my model type. The code works in Unity, but the session (create by InferenceSession(), throws a null exception when I try to use Run(). This only happens on device and not in the Unity editor. Any ideas?
Specifically at this line:
results = session.Run(inputs).First().AsEnumerable();
I get this exception:
Object Reference Not Set To An Instance Of An Object
2023-07-17 21:37:15.651;10106;16270;16290;Info;Unity;at System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00000] in <00000000000000000000000000000000>:0;
Had a thought. It may be the the onnx file isnt being loaded propely. What directory does the file need to be in to be loaded?