Open Yandychang1 opened 3 years ago
Providing you know how to access your resource, which is built-in into your application, such a resource would contain a binary blob that holds a serialized ONNX model. You then need to instantiate InferenceSession object using one of the two constructors that take byte[]
as an argument. See https://github.com/microsoft/onnxruntime/blob/master/csharp/src/Microsoft.ML.OnnxRuntime/InferenceSession.cs#L54 and
https://github.com/microsoft/onnxruntime/blob/master/csharp/src/Microsoft.ML.OnnxRuntime/InferenceSession.cs#L65
Thank you very much, It worked nicely...
I am looking for an example on loading an ONNX file from an embedded resource in c#, and was wondering if anyone could point me in the right direction.