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

[Docs] Add onnxslim reference #1344

Merged
merged 3 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ paddle2onnx --model_dir saved_inference_model \

如你对导出的 ONNX 模型有优化的需求,推荐使用 `onnx-simplifier`,也可使用如下命令对模型进行优化

```
pip install onnxslim
onnxslim model.onnx slim.onnx
Zheng-Bicheng marked this conversation as resolved.
Show resolved Hide resolved
```

```
python -m paddle2onnx.optimize --input_model model.onnx --output_model new_model.onnx
inisis marked this conversation as resolved.
Show resolved Hide resolved
```
Expand Down
9 changes: 9 additions & 0 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ If you need to adjust ONNX models, please refer to [ONNX related tools](./tools/

If you have optimization needs for the exported ONNX model, we recommend using `onnx-simplifier`. You can also optimize the model using the following command.

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

```
python -m paddle2onnx.optimize --input_model model.onnx --output_model new_model.onnx
inisis marked this conversation as resolved.
Show resolved Hide resolved
```

# 5 Code Contribution

A thriving ecosystem requires everyone's collaborative efforts. Developers can refer to the [Paddle2ONNX Contribution Guide](./docs/zh/Paddle2ONNX_Development_Guide.md) to contribute code to Paddle2ONNX.
Expand Down