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 model_export_cn.md 添加导出dynamic_shape.pdtxt操作步骤 #3378

Merged
merged 1 commit into from
Jul 26, 2023
Merged
Changes from all 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
11 changes: 10 additions & 1 deletion docs/model_export_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,22 @@ python tools/export.py \
注意:
* 如果部署模型时,出现和shape相关的问题,请尝试指定input_shape。

## 3. 预测模型文件
## 3. 导出dynamic_shape.pdtxt(可选,当使用TensorRT加速,并开启dynamic_shape时,可直接加载该文件)
```shell
python deploy/python/collect_dynamic_shape.py \
--config output/inference_model/deploy.yaml \
--image_path path/to/test/image \
--dynamic_shape_path output/inference_model/dynamic_shape.pbtxt
```

## 4. 预测模型文件

如下是导出的预测模型文件。

```shell
output/inference_model
├── deploy.yaml # 部署相关的配置文件,主要说明数据预处理方式等信息
├── dynamic_shape.pdtxt # 用于TensorRT加速的dynamic shape信息
├── model.pdmodel # 预测模型的拓扑结构文件
├── model.pdiparams # 预测模型的权重文件
└── model.pdiparams.info # 参数额外信息,一般无需关注
Expand Down