ML.NET fails to run on uwp

蹲街弑〆低调 提交于 2021-02-08 05:38:37

问题


I built a UWP App in Visual Studio 2017 and also added a class library in the solution to run ML.NET but every time I run the application I get an exception

PlatformNotSupportedException. Retrieving information about local processes is not supported on this platform

What could be the problem?


回答1:


This is a .NET Standard exception that happens when the a library tries to access an API which is not actually implemented on the platform but is present to make the platform .NET Standard compliant. In this case it seems ML.NET is trying to get process information which is not implemented in UWP yet so it fails with the given exception.

I would suggest filing this as an issue in the ML.NET GitHub issues to get first-party advice on if there is a workaround or to inform the team that developers need this to be able to use the library in UWP.




回答2:


I figured out how to solve my problem. I decided to first train the model on a .NET Core console app the export the trained model in my UWP app. It worked perfectly. Thanks to this post




回答3:


ML.NET only supports x64 projects at this time. Is your project an x86 project by any chance?




回答4:


ML.Net 0.7 now supports both x86 and x64 platforms... not ARM support yet.

https://blogs.msdn.microsoft.com/dotnet/2018/11/08/announcing-ml-net-0-7-machine-learning-net/



来源:https://stackoverflow.com/questions/50829968/ml-net-fails-to-run-on-uwp

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