Skip to content

Commit

Permalink
update how_to\compile
Browse files Browse the repository at this point in the history
  • Loading branch information
Anleeos committed Nov 30, 2023
1 parent 2800124 commit b39c1a7
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions docs/how_to/compile/01-compile_pytorch.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ title: 编译 PyTorch 模型
可通过 pip 快速安装:

``` bash
pip install torch==1.7.0
pip install torchvision==0.8.1
pip install torch
pip install torchvision
```

或参考官网:https://pytorch.org/get-started/locally/
Expand Down
4 changes: 4 additions & 0 deletions docs/how_to/compile/02-compile_tensorflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ title: 编译 TensorFlow 模型

首先安装 TensorFlow Python 模块(可参考 https://www.tensorflow.org/install)。

```bash
pip install tensorflow
```

``` python
# 导入 tvm 和 relay
import tvm
Expand Down
5 changes: 2 additions & 3 deletions docs/how_to/compile/03-compile_mxnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ title: 编译 MXNet 模型

本文将介绍如何用 Relay 部署 MXNet 模型。

首先安装 mxnet 模块,可通过 pip 快速安装
首先安装 mxnet 模块:

``` bash
pip install mxnet --user
pip install mxnet
```

或参考官方安装指南:https://mxnet.apache.org/versions/master/install/index.html

``` python
# 一些标准的导包
import mxnet as mx
import tvm
import tvm.relay as relay
Expand Down
4 changes: 2 additions & 2 deletions docs/how_to/compile/04-compile_onnx.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ title: 编译 ONNX 模型

本文将介绍如何用 Relay 部署 ONNX 模型。

首先安装 ONNX 包,最便捷的方法推荐安装 protobuf 编译器
首先安装 ONNX 包:

``` bash
pip install --user onnx onnxoptimizer
pip install onnx onnxoptimizer
```

或参考官方网站:https://github.com/onnx/onnx
Expand Down
3 changes: 1 addition & 2 deletions docs/how_to/compile/05-compile_keras.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ title: 编译 Keras 模型
首先安装 Keras 和 TensorFlow,可通过 pip 快速安装:

``` bash
pip install -U keras --user
pip install -U tensorflow --user
pip install keras tensorflow
```

或参考官网:https://keras.io/#installation
Expand Down
3 changes: 1 addition & 2 deletions docs/how_to/compile/06-compile_tflite.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ title: 编译 TFLite 模型
首先安装 TFLite 包。

``` bash
# 安装 tflite
pip install tflite==2.1.0 --user
pip install tflite==2.1.0
```

或者自行生成 TFLite 包,步骤如下:
Expand Down
4 changes: 2 additions & 2 deletions docs/how_to/compile/07-compile_coreml.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ title: 编译 CoreML 模型

本文介绍如何用 Relay 部署 CoreML 模型。

首先安装 coremltools 模块,可通过 pip 快速安装
首先安装 coremltools 模块:

``` bash
pip install -U coremltools --user
pip install coremltools
```

或参考官网:https://github.com/apple/coremltools
Expand Down
3 changes: 1 addition & 2 deletions docs/how_to/compile/08-compile_darknet.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ title: 在 DarkNet 模型中编译 YOLO-V2 和 YOLO-V3
本文介绍如何用 TVM 部署 DarkNet 模型。所有必需的模型和库都可通过脚本从 Internet 下载。此脚本运行带有边界框的 YOLO-V2 和 YOLO-V3 模型。DarkNet 解析依赖 CFFI 和 CV2 库,因此执行脚本前要安装这两个库。

``` bash
pip install cffi
pip install opencv-python
pip install cffi opencv-python
```

``` python
Expand Down
4 changes: 2 additions & 2 deletions docs/how_to/compile/09-compile_paddlepaddle.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ title: 编译 PaddlePaddle 模型

**作者**[Ziyuan Ma](https://github.com/ZiyuanMa/)

本文介绍如何用 Relay 部署 PaddlePaddle 模型,首先安装 PaddlePaddle(版本>=2.1.3),可通过 pip 快速安装
本文介绍如何用 Relay 部署 PaddlePaddle 模型,首先安装 PaddlePaddle(版本>=2.1.3):

``` bash
pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
```

或参考官方网站https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html
获取更多详情,可参考官方安装教程https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html

``` python
import tarfile
Expand Down
2 changes: 1 addition & 1 deletion docs/how_to/compile/10-compile_oneflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ title: 编译 OneFlow 模型

``` bash
pip install flowvision==0.1.0
python3 -m pip install -f https://release.oneflow.info oneflow==0.7.0+cpu
pip install -f https://release.oneflow.info oneflow==0.7.0+cpu
```

或参考官网:https://github.com/Oneflow-Inc/oneflow
Expand Down

0 comments on commit b39c1a7

Please sign in to comment.