ONNX models
Windows Machine Learning supports models in the Open Neural Network Exchange (ONNX) format. ONNX is an open format for ML models, allowing you to interchange models between various ML frameworks and tools.
There are several ways in which you can obtain a model in the ONNX format, including:
ONNX Model Zoo: Contains several pre-trained ONNX models for different types of tasks. Download a version that is supported by Windows ML and you are good to go!
Native export from ML training frameworks: Several training frameworks support native export functionality to ONNX, like Chainer, Caffee2, and PyTorch, allowing you to save your trained model to specific versions of the ONNX format. In addition, services such as Azure Machine Learning and Azure Custom Vision also provide native ONNX export.
- To learn how to train and export an ONNX model in the cloud using Custom Vision, check out Tutorial: Use an ONNX model from Custom Vision with Windows ML (preview).
Convert existing models using ONNXMLTools: This Python package allows models to be converted from several training framework formats to ONNX. As a developer, you can specify which version of ONNX you would like to convert your model to, depending on which builds of Windows your application targets. If you are not familiar with Python, you can use Windows ML's UI-based Dashboard to easily convert your models with just a few clicks.
Important
Not all ONNX versions are supported by Windows ML. In order to know which ONNX versions are officially supported in the Windows versions targeted by your application, please check ONNX versions and Windows builds.
Once you have an ONNX model, you'll integrate the model into your app's code, and then you'll be able use machine learning in your Windows apps and devices!
Note
Use the following resources for help with Windows ML:
- To ask or answer technical questions about Windows ML, please use the windows-machine-learning tag on Stack Overflow.
- To report a bug, please file an issue on our GitHub.