ONNX モデルONNX models
Windows Machine Learning は、Open Neural Network Exchange (ONNX) 形式のモデルをサポートしています。Windows Machine Learning supports models in the Open Neural Network Exchange (ONNX) format. ONNX は ML モデルのオープンな形式であるため、さまざまな ML フレームワークおよびツールの間でモデルを交換できます。ONNX is an open format for ML models, allowing you to interchange models between various ML frameworks and tools.
ONNX 形式のモデルは、次に示すようないくつかの方法で取得できます。There are several ways in which you can obtain a model in the ONNX format, including:
ONNX Model Zoo: さまざまな種類のタスクのためのいくつかの事前トレーニング済みの ONNX モデルが含まれています。ONNX Model Zoo: Contains several pre-trained ONNX models for different types of tasks. Windows ML でサポートされているバージョンをダウンロードすれば、すぐに使用できます。Download a version that is supported by Windows ML and you are good to go!
ML トレーニング フレームワークからのネイティブ エクスポート: Chainer、Caffee2、PyTorch などのいくつかのトレーニング フレームワークでは ONNX へのネイティブ エクスポート機能をサポートしているため、トレーニング済みのモデルを ONNX 形式の特定のバージョンに保存できます。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. さらに、Azure Machine Learning や Azure Custom Vision などのサービスでもネイティブな ONNX エクスポートが提供されます。In addition, services such as Azure Machine Learning and Azure Custom Vision also provide native ONNX export.
- Custom Vision を使用してクラウド内の ONNX モデルをトレーニングおよびエクスポートする方法については、「チュートリアル: Custom Vision からエクスポートされた ONNX モデルを Windows ML (プレビュー) で使用する」を確認してください。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).
WinMLTools を使用して既存のモデルを変換する: この Python パッケージを使用すると、モデルをいくつかのトレーニング フレームワーク形式から ONNX に変換できます。Convert existing models using WinMLTools: This Python package allows models to be converted from several training framework formats to ONNX. 開発者は、アプリケーションが対象としている Windows のビルドに応じて、モデルをどのバージョンの 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. Python に詳しくない場合は、Windows ML の UI ベースのダッシュボードを使用して、数回クリックするだけでモデルを簡単に変換できます。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.
重要
すべての ONNX バージョンが Windows ML でサポートされているわけではありません。Not all ONNX versions are supported by Windows ML. アプリケーションが対象としている Windows バージョンでどの ONNX バージョンが正式にサポートされているかを調べるには、「ONNX バージョンと Windows ビルド」を確認してください。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.
ONNX モデルを作成したら、アプリのコードにそのモデルを統合すると、Windows アプリおよびデバイスで機械学習を使用できるようになります。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!
注意
Windows ML に関するヘルプについては、次のリソースを参照してください。Use the following resources for help with Windows ML:
- Windows ML に関する技術的な質問をしたり、質問に回答したりするには、Stack Overflow の windows-machine-learning タグを使用してください。To ask or answer technical questions about Windows ML, please use the windows-machine-learning tag on Stack Overflow.
- バグを報告するには、GitHub で問題を提出してください。To report a bug, please file an issue on our GitHub.
- 機能をリクエストするには、Windows Developer Feedback に進んでください。To request a feature, please head over to Windows Developer Feedback.