编译深度学习模型# TVM 包括各种前端,可以导入不同格式的模型。这些教程演示了如何使用 Python API 导入模型。 编译 PyTorch 模型 载入 PyTorch 预训练模型 加载测试图片 导入 Graph 到 Relay Relay 构建 在 TVM 上执行可移植 Graph 查找 synset 名称 Tensorflow 前端 准备阶段 在 tensorflow 上推理 Relay 推理 布局变换 编译 MXNet 模型 从 gluon 模型动物园下载 Resnet18 模型 编译 Graph 在 TVM 上执行可移植 graph 使用带有预训练权重的 MXNet symbol 编译 ONNX 模型 加载预训练 ONNX 模型 加载测试图片 使用 relay 编译模型 在 TVM 上执行 展示结果 Compile Keras Models Load pretrained keras model Load a test image Compile the model with Relay Execute on TVM Look up synset name 编译 TFLite 模型 用于下载和提取zip文件的实用工具 加载预训练 TFLite 模型 加载测试图片 使用 relay 编译模型 TVM 执行 展示结果 Compile CoreML Models Load pretrained CoreML model Load a test image Compile the model on Relay Execute on TVM Look up synset name 编译 DarkNet 中的 YOLO-V2 和 YOLO-V3 模型 选择模型 下载必要文件 加载计算图到 Relay 加载测试图片 执行 TVM Runtime Compile Caffe2 Models Load pretrained Caffe2 model Load a test image Compile the model on Relay Execute on TVM Look up synset name Compile OneFlow Models Load a pretrained OneFlow model and save model Load a test image Import the graph to Relay Relay Build Execute the portable graph on TVM Look up synset name Compile PaddlePaddle Models Load pretrained ResNet50 model Load a test image Compile the model with relay Execute on TVM Look up synset name