Metadata-Version: 2.1
Name: winmltools
Version: 1.5.1
Summary: Converts Machine Learning models to ONNX for use in Windows ML
Home-page: https://microsoft.com
Author: Microsoft Corporation
Author-email: winml@microsoft.com
License: MIT License
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: License :: OSI Approved :: MIT License
Requires-Dist: numpy (==1.16.4)
Requires-Dist: protobuf (==3.6.1)
Requires-Dist: onnx (==1.5.0)
Requires-Dist: onnxmltools (==1.5.1)
Requires-Dist: tf2onnx (==1.5.3)

WinMLTools provide following tools for Windows ML:

Model Conversion
################

WinMLTools enables you to convert models from different machine 
learning toolkits into `ONNX <https://onnx.ai>`_ for use with Windows ML. 
Currently the following toolkits are supported:

* apple CoreML
* keras
* scikit-learn
* lightgbm
* xgboost
* libSVM
* tensorflow (experimental)

Here is a simple example to convert a Core ML model:

::

    from coremltools.models.utils import load_spec
    from winmltools import convert_coreml
    model_coreml = load_spec('example.mlmodel')
    model_onnx = convert_coreml(model_coreml, 10, name='ExampleModel')

Post Training Weight Quantization
#################################

WinMLTools provides quantization tool to reduce the memory footprint of the model.

Here is an example to convert an ONNX model to a quantized ONNX model:

::

    import winmltools

    model = winmltools.load_model('model.onnx')
    quantized_model = winmltools.quantize(model, per_channel=True, nbits=8, use_dequantize_linear=True)
    winmltools.save_model(quantized_model, 'quantized.onnx')


Dependencies
============

In order to convert from different toolkits, you may have to install the following packages for different converters: 

+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| Toolkit      | Source                                                                                                                                             |
+==============+====================================================================================================================================================+
| keras        | https://pypi.org/project/Keras                                                                                                                     |
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| tensorflow   | https://pypi.org/project/tensorflow                                                                                                                |
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| scikit-learn | https://pypi.org/project/scikit-learn                                                                                                              |
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| lightgbm     | https://pypi.org/project/lightgbm                                                                                                                  |
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| xgboost      | https://pypi.org/project/xgboost                                                                                                                   |
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| libsvm       | You can download libsvm wheel from various web sources. One example can be found here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#libsvm          |
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| coremltools  | Currenlty coreml does not distribute coreml packaging on windows. You can install from source: pip install git+https://github.com/apple/coremltools|
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------+


For more information on WinMLTools, you can go to `Convert ML models to ONNX with WinMLTools
<https://docs.microsoft.com/en-us/windows/ai/convert-model-winmltools>`_

License
=======

MIT License


