From 88230a89a1e60edf3b71d6574911f3d7ee71ef77 Mon Sep 17 00:00:00 2001 From: inisis Date: Fri, 9 Aug 2024 02:49:29 +0000 Subject: [PATCH 1/2] add onnxslim reference Signed-off-by: inisis --- README.md | 5 +++++ README_en.md | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/README.md b/README.md index 2426a30e7..c9f62df6d 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,11 @@ paddle2onnx --model_dir saved_inference_model \ 如你对导出的 ONNX 模型有优化的需求,推荐使用 `onnx-simplifier`,也可使用如下命令对模型进行优化 +``` +pip install onnxslim +onnxslim model.onnx slim.onnx +``` + ``` python -m paddle2onnx.optimize --input_model model.onnx --output_model new_model.onnx ``` diff --git a/README_en.md b/README_en.md index 963ec89e1..272b95611 100644 --- a/README_en.md +++ b/README_en.md @@ -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 +``` + # 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. From 60d5f6a41f315efef3ef0693f6533b30de2ff8da Mon Sep 17 00:00:00 2001 From: inisis Date: Fri, 9 Aug 2024 02:49:29 +0000 Subject: [PATCH 2/2] add onnxslim reference Signed-off-by: inisis --- README.md | 3 ++- README_en.md | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2426a30e7..631dce153 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,8 @@ paddle2onnx --model_dir saved_inference_model \ 如你对导出的 ONNX 模型有优化的需求,推荐使用 `onnx-simplifier`,也可使用如下命令对模型进行优化 ``` -python -m paddle2onnx.optimize --input_model model.onnx --output_model new_model.onnx +pip install onnxslim +onnxslim model.onnx slim.onnx ``` # 5 代码贡献 diff --git a/README_en.md b/README_en.md index 963ec89e1..a8e34696e 100644 --- a/README_en.md +++ b/README_en.md @@ -71,6 +71,11 @@ 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 +``` + # 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.