文章目录
初识 ONNX
ONNX 定义
ONNX is an open format built to represent machine learning models. ONNX defines a common set of operators - the building blocks of machine learning and deep learning models - and a common file format to enable AI developers to use models with a variety of frameworks, tools, runtimes, and compilers.
ONNX 是一种用于表征机器学习模型的开放格式构建。 ONNX 定义了一组通用算子——机器学习和深度学习模型的构建块——以及一种通用文件格式,使 AI 开发人员能够使用不同框架、工具、运行时和编译器类型下的模型。
ONNX 作用
ONNX Runtime
ONNX Runtime is a performance-focused engine for ONNX models, which inferences efficiently across multiple platforms and hardware (Windows, Linux, and Mac and on both CPUs and GPUs).
ONNX Python 安装
conda create -n torch18 python= 3.7.6
conda activate torch18
pip3 install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html
pip install numpy protobuf==3.16.0
pip install onnx
conda install --name torch18 ipykernel -y
这条命令非必须运行【盲猜】
sudo apt install vulkan-utils