Facebook and Microsoft offered an open format for the exchange of machine learning models

Sep 11, 2017 | 4:09 pm

Published by | Chandan Singh

Facebook and Microsoft took the initiative to unify the exchange of models between different machine learning frameworks and artificial intelligence systems.

The result was the development of an open format ONNX (Open Neural Network Exchange) for the presentation of models of deep machine learning. The ONNX reference implementation is written in Python and is distributed under the MIT license.

Now there are situations when in the course of experiments certain specific capabilities of certain frameworks are used, but when creating the final product the requirements change and there is a need to use other possibilities or overcome the limitations. The need for the possibility is provided in other frameworks, but adapting the created model of machine learning for them becomes a difficult task, requiring a large amount of manual work.

It is expected that ONNX will be the starting point in building an open ecosystem in which developers of machine learning models and artificial intelligence systems will not be tied tospecific tools and can easily switch between different frameworks, choosing the optimal combination for themselves.

ONNX defines a model of an expandable calculation graph, as well as built-in operators and standard data types. Each graph of the data stream is structured as a list of nodes, designed as a cyclic graph. Nodes have one or more input and output streams. Each node calls a specific operator. Operators are implemented separately, but can be built using a set of standard built-in operators that are transferred between different frameworks. Each ONNX-enabled framework provides its implementation of operator data for all supported types of data.

It was announced about the imminent implementation of ONNX support in the Caffe2, PyTorch and CNTK (Cognitive Toolkit) frameworks. Using ONNX, a model trained in one of these frameworks can easily be ported to work in another framework. For example, researchers can build an experimental model using PyTorch, which has great flexibility and wide capabilities, or with the ConvNet framework, which allows you to quickly create prototypes in interactive mode, and when you create the final product, to transfer to Caffe2, which is characterized by high performance and the ability to work on mobile devices .