Microsoft to Open ONNX Runtime Source Code

It's a high-performance engine for machine learning models in the ONNX (Open Neural Network Exchange) format
07 December 2018   101

Microsoft announced the deployment of ONNX Runtime source code on GitHub. The project is a high-performance engine for machine learning models in the ONNX (Open Neural Network Exchange) format, ensuring compatibility of ML models with free AI frameworks (TensorFlow, Cognitive Toolkit, Caffe2, MXNet). Therefore, ONNX Runtime is used to optimize computations in models of deep learning of neural networks.

With the translation of the project into open source, the company hopes to attract more people to the development of machine learning. Moreover, Microsoft promised to respond quickly to commits.

To use ONNX Runtime, it is necessary to determine the ONNX model and select a tool for it. Their list and instructions are available on the GitHub page. Microsoft offers several options for those who do not know where to start:

  • Download ready-made ResNet or TinyYOLO models from ONNX Model Zoo;
  • Create your own computer vision models using Azure Custom Vision Service
  • convert models created in TensorFlow, Keras, Scikit-Learn or CoreML using ONNXMLTools and TF2ONNX;
  • train new models using Azure machine learning and save the result in ONNX format.

According to Microsoft spokesman Eric Boyd, the Bing Search, Bing Ads and Office services teams were able to achieve twice the performance of ML models using ONNX Runtime compared to standard solutions. Therefore, it is important to support the project by both users and large companies. As for the latter, while they embody the following projects:

  • Microsoft and Intel are implementing the nGraph compiler;
  • NVIDIA is working on TensorRT integration;
  • Qualcomm is looking forward to developing the Snapdragon mobile platform.

In early December 2017, ONNX was transferred from the stage of early access to a project corresponding to the conditions of industrial operation. Companies urged the community to join the project and help create a unified platform for engaging with in-depth training tools.

Facebook to Release PyTorch 1.0

This release added support for large cloud platforms, a C ++ interface, a set of JIT compilers
10 December 2018   125

Facebook has released a stable version of the library for machine learning PyTorch 1.0. This iteration added support for large cloud platforms, a C ++ interface, a set of JIT compilers, and various improvements.

The stable version received a set of JIT compilers that eliminate the dependence of the code on the Python interpreter. The model code is transformed into Torch Script - a superstructure over Python. Keeping the opportunity to work with the model in the Python environment, the user can download it to other projects not related to this language. So, the PyTorch developers state that the code processed in this way can be used in the C ++ API.

The torch.distributed package and the torch.nn.parallel.DistributedDataParallel module are completely redesigned. torch.distributed now has better performance and works asynchronously with the Gloo, NCCL and MPI libraries.

The developers added a C ++ wrapper to PyTorch 1.0. It contains analogs of Python interface components, such astorch.nn,torch.optim, According to the creators, the new interface should provide high performance for C ++ applications. True, the C ++ API is still experimental, but it can be used in projects now.

To improve the efficiency of working with PyTorch 1.0, a Torch Hub repository has been created, which stores pre-trained models of neural networks. You can publish your own development using the file, after which the model will be available for download by any user via the torch.hub.load API.

Support for C extensions and the module torch.utils.trainer were removed from the library.

Facebook released the preliminary version of PyTorch 1.0 at the beginning of October 2018, and in two months the developers brought the framework to a stable state.