Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README #1345

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ paddle2onnx --model_dir saved_inference_model \

## 4.5 优化ONNX

如你对导出的 ONNX 模型有优化的需求,推荐使用 `onnx-simplifier`,也可使用[onnxslim](https://github.com/inisis/OnnxSlim)对模型进行优化
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的 onnx-simplifier 也是第三方的优化工具,不是Paddle的官方套件,也需要简单介绍,同时也帮忙补充一下用法吧。

pip3 install -U pip && pip3 install onnxsim
onnxsim input_onnx_model output_onnx_model

如你对导出的 ONNX 模型有优化的需求,推荐使用 `onnx-simplifier`,也可使用第三方优化工具[onnxslim](https://github.com/inisis/OnnxSlim)对模型进行优化
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议把 onnx-simplifier 和 OnnxSlim 这两个项目分开两段来写,你可以把 onnxslim 写前面,把 onnx-simplifier 写后面

```
pip install onnxslim
onnxslim model.onnx slim.onnx
```


# 5 代码贡献

Expand Down
7 changes: 5 additions & 2 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@ If you need to adjust ONNX models, please refer to [ONNX related tools](./tools/

## 4.5 Optimize ONNX

If you have optimization needs for the exported ONNX model, we recommend using `onnx-simplifier`. You can also optimize the model using [onnxslim](https://github.com/inisis/OnnxSlim).

If you have optimization needs for the exported ONNX model, we recommend using `onnx-simplifier`. You can also optimize the model using third-party tool [onnxslim](https://github.com/inisis/OnnxSlim).
```
pip install onnxslim
onnxslim model.onnx slim.onnx
```

# 5 Code Contribution

Expand Down