laitimes

Everyone who learns AI should know about ONNX, and Huawei is also a member

author:Charlie who loves programming

As a person who wants to learn more about AI, and wants to learn more about machine learning and large language models, I don't know that ONNX is not good, so let's briefly introduce ONNX today.

Everyone who learns AI should know about ONNX, and Huawei is also a member

1. What is ONNX?

Everyone who learns AI should know about ONNX, and Huawei is also a member

ONNX stands for Open Neural Network Exchange, and the Chinese name is Open Neural Network Exchange, which is an open and open model exchange standard, which is used as an exchange standard in the model files used in various neural network frameworks, which realizes portability between neural network models and avoids the dependence of a single model manufacturer, so this is very important for AI researchers.

Take a look at the definition on the ONNX website:

ONNX is an open format for representing machine learning models. ONNX defines a set of common operators (the building blocks of machine learning and deep learning models) and a common file format that enables AI developers to use models with a variety of frameworks, tools, runtimes, and compilers
Everyone who learns AI should know about ONNX, and Huawei is also a member

The Open Neural Network Exchange (ONNX) is an open-source AI ecosystem of technology companies and research organizations[3] that establish open standards representing machine learning algorithms and software tools to foster innovation and collaboration in the field of AI. ONNX can find the project github.com/onnx/onnx on GitHub.

Originally, ONNX was an internal project of Facebook's PyTorch team, and the original project was called Toffee, which was proposed to solve the problem of incompatibility between the company's models. Later, in September 2017, Facebook and Microsoft joined forces to rename the project ONNX and uphold open source standards.

Soon, more members, such as IBM, Huawei, Intel, AMD, Arm, and Qualcomm, joined the project, which led to the rapid development of the project. By October 2017, Microsoft announced that it would add its Cognitive Toolkit and Project Brainwave platform to the program. In November 2019, ONNX was accepted as a graduation project for Linux Foundation AI.

In the list of ONNX members so far, you can see the names of many mainland AI companies:

Everyone who learns AI should know about ONNX, and Huawei is also a member

There are two main advantages of ONNX:

Framework interoperability

Allows developers to move between frameworks more easily, some of which may be better suited to specific stages of the development process, such as rapid training, network architecture flexibility, or inference on mobile devices.

Share optimizations

Allows hardware vendors and others to improve the performance of artificial neural networks for multiple frameworks simultaneously by positioning ONNX representations.

2. The basic content of ONNX

ONNX provides extensible computational graph models, built-in operators, and definitions of standard data types focused on inference tasks.

Each computed data flow diagram is a list of nodes that form an acyclic graph. Nodes have inputs and outputs. Each node is a call to an operator. Metadata records the charts. Each framework that supports ONNX will provide built-in operators.

ONNX can be likened to a programming language dedicated to mathematical functions. It defines all the necessary actions required for a machine learning model to use the language to achieve its inference capabilities. For example, linear regression can be expressed in the following ways:

def onnx_linear_regressor(X):
"ONNX code for a linear regression"
return onnx.Add(onnx.MatMul(X, coefficients), bias)           

In this case, it's very similar to an expression written by a developer in Python. It can also be represented as a graph that shows step-by-step how to transform features to get predictions. That's why machine learning models implemented with ONNX are often referred to as ONNX graphs.

Everyone who learns AI should know about ONNX, and Huawei is also a member

ONNX aims to provide a ubiquitous language that any machine learning framework can use to describe its models. The first is to make it easier to deploy machine learning models in production.

The following diagram shows a list of models and ONNX transformations for leading AI frameworks:

Everyone who learns AI should know about ONNX, and Huawei is also a member
Everyone who learns AI should know about ONNX, and Huawei is also a member

The ONNX interpreter (or runtime) can be specifically implemented and optimized in the environment where ONNX is deployed to accomplish this task. With ONNX, you can build a unique process for deploying models in production, independent of the learning framework used to build them.

3. ONNX Runtime (Execution Engine)

As mentioned earlier, since ONNX is a model, ONNX also provides a model execution engine for reference implementation, and the following is the framework that can run ONNX:

frame URL
Everyone who learns AI should know about ONNX, and Huawei is also a member
http://kalrayinc.com/
Everyone who learns AI should know about ONNX, and Huawei is also a member
http://sophon.ai/
Everyone who learns AI should know about ONNX, and Huawei is also a member
https://ip.cadence.com/ai&CMP=TIP_AI1_IndTre_Arti_0918_PP
Everyone who learns AI should know about ONNX, and Huawei is also a member
https://www.ceva-dsp.com/product/ceva-deep-neural-network-cdnn/
Everyone who learns AI should know about ONNX, and Huawei is also a member
https://datakalab.com/technology
Everyone who learns AI should know about ONNX, and Huawei is also a member
deepC
https://github.com/ai-techsystems/deepC
Everyone who learns AI should know about ONNX, and Huawei is also a member
roq
https://groq.com/products/
Everyone who learns AI should know about ONNX, and Huawei is also a member
https://habana.ai/
Everyone who learns AI should know about ONNX, and Huawei is also a member
https://hailo.ai/product-hailo/hailo-dataflow-compiler/
Everyone who learns AI should know about ONNX, and Huawei is also a member
Xiaomi's MACE
https://github.com/XiaoMi/mace
Everyone who learns AI should know about ONNX, and Huawei is also a member
https://developer.nvidia.com/tensorrt
Everyone who learns AI should know about ONNX, and Huawei is also a member
https://docs.openvino.ai/
Everyone who learns AI should know about ONNX, and Huawei is also a member
Optimum
https://huggingface.co/docs/optimum/index
Everyone who learns AI should know about ONNX, and Huawei is also a member
https://onnx.ai/onnx-mlir
Everyone who learns AI should know about ONNX, and Huawei is also a member
https://github.com/microsoft/onnxruntime
Everyone who learns AI should know about ONNX, and Huawei is also a member
http://www.qualcomm.com/
Everyone who learns AI should know about ONNX, and Huawei is also a member
http://www.rock-chips.com/a/en/products/RK18_Series/2019/0529/989.html
Everyone who learns AI should know about ONNX, and Huawei is also a member
https://www.synopsys.com/dw/ipdir.php?ds=arc-metaware-ev
Everyone who learns AI should know about ONNX, and Huawei is also a member
https://www.synopsys.com/dw/ipdir.php?ds=arc-metaware-ev
Everyone who learns AI should know about ONNX, and Huawei is also a member
ncnn
https://github.com/Tencent/ncnn
Everyone who learns AI should know about ONNX, and Huawei is also a member
https://www.teradata.com/Blogs/Solving-Data-Science-Operationalization-Dilemma-with-Vantage-BYOM
Everyone who learns AI should know about ONNX, and Huawei is also a member
https://www.tensil.ai/
Everyone who learns AI should know about ONNX, and Huawei is also a member
https://github.com/onnx/onnx-tensorflow/blob/main/README.md
Everyone who learns AI should know about ONNX, and Huawei is also a member
https://docs.tvm.ai/tutorials/frontend/from_onnx.html#sphx-glr-tutorials-frontend-from-onnx-py
Everyone who learns AI should know about ONNX, and Huawei is also a member
https://www.beckhoff.com/machine-learning/
Everyone who learns AI should know about ONNX, and Huawei is also a member
https://vespa.ai/
Everyone who learns AI should know about ONNX, and Huawei is also a member
uwp
https://docs.microsoft.com/en-us/windows/uwp/machine-learning/
Everyone who learns AI should know about ONNX, and Huawei is also a member
https://www.hiascend.com/en/software/modelzoo#onnx

4. ONNX Model Visualization Tool

In order to better understand the ONNX model, here are some visualization tools to better understand the visual calculation graph.

Visualization tools URL
Everyone who learns AI should know about ONNX, and Huawei is also a member
gratis

https://github.com/lutzroeder/Netron

Download address: https://github.com/lutzroeder/netron/releases/latest

Everyone who learns AI should know about ONNX, and Huawei is also a member
PaddlePaddle's deep learning visualization tool

https://github.com/PaddlePaddle/VisualDL

Official website: https://www.paddlepaddle.org.cn/paddle/visualdl

Everyone who learns AI should know about ONNX, and Huawei is also a member
ML Models & Internal Tensor 3D Visualization Tools (Free)

https://github.com/zetane/viewer

Windows download address: https://download.zetane.com/zetane/Zetane-1.7.4.msi

Mac download link:

https://download.jetane.com/jetane/jetane-1.7.4.dmg

Screenshot of zetane in use:

Everyone who learns AI should know about ONNX, and Huawei is also a member

5. Summary

This article systematically introduces the functions and origins of ONNX, and introduces the basic syntax and related runtime and visualization tools

#机器学习##每日机器学习##AI技术##华为##华为AI新布局##升腾##开放神经网络##模型##神经网络##深度学习#

Read on