ML.NET: strange runtime error on some machines

你离开我真会死。 提交于 2019-12-11 18:17:42

问题


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.

来源:https://stackoverflow.com/questions/53804138/ml-net-strange-runtime-error-on-some-machines

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!