0

I wrote a simple UWP app using the ML.NET framework, and it worked on one of my machines without installing any Nuget packages, without any additional setup etc.

However, on my other machine, after running the application, I get this error:

System.Runtime.InteropServices.COMException: 'Unspecified error

No suitable kernel definition found for op Sub (node Minus675)'

The error happens in this segment of code:

 public static async Task<modelModel> CreateFromStreamAsync(IRandomAccessStreamReference stream)
 {
      modelModel learningModel = new modelModel();
      learningModel.model = await LearningModel.LoadFromStreamAsync(stream);
      learningModel.session = new LearningModelSession(learningModel.model); // it breaks here
      learningModel.binding = new LearningModelBinding(learningModel.session);
      return learningModel;
        }

In case anyone should ask - yes I have added my .onnx model in the Assets folder. My configuration is: VS 2017, Windows 10 version 1809, build 17763.194, and I have Windows 10 SDK version 10.0.17763.132. I have tried installing the Visual Studio Tools for AI and ML.NET Templates VS extensions, but it didn't help.

Eutherpy
  • 4,471
  • 7
  • 40
  • 64
  • This is just a guess: Do you have Windows developer mode enabled? I've seen strange errors in the past if this is not enabled. – Brian Rasmussen Dec 16 '18 at 17:50
  • @BrianRasmussen Hm, no, I will try tomorrow and report back :D – Eutherpy Dec 16 '18 at 21:19
  • I solved my problem; I was using the https://github.com/onnx/models/tree/master/emotion_ferplus model, and downloading the one with a different opset version fixed it. – Eutherpy Dec 17 '18 at 08:58

0 Answers0