From 725a8ffda618eb8da16171a6b2006f6ab85e9928 Mon Sep 17 00:00:00 2001 From: Tingquan Gao <35441050@qq.com> Date: Tue, 23 Mar 2021 11:03:44 +0800 Subject: [PATCH] Update usage, test=document_fix (#647) --- docs/en/tutorials/getting_started_en.md | 10 +--------- docs/zh_CN/tutorials/getting_started.md | 9 +-------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/docs/en/tutorials/getting_started_en.md b/docs/en/tutorials/getting_started_en.md index 5cdfd409..ca40a181 100644 --- a/docs/en/tutorials/getting_started_en.md +++ b/docs/en/tutorials/getting_started_en.md @@ -233,15 +233,7 @@ Among them, the `--model` parameter is used to specify the model name, `--pretra **Note**: 1. If `--output_path=./inference`, then three files will be generated in the folder `inference`, they are `inference.pdiparams`, `inference.pdmodel` and `inference.pdiparams.info`. -2. In the file `export_model.py:line53`, the `shape` parameter is the shape of the model input image, the default is `224*224`. Please modify it according to the actual situation, as shown below: - -```python -50 # Please modify the 'shape' according to actual needs -51 @to_static(input_spec=[ -52 paddle.static.InputSpec( -53 shape=[None, 3, 224, 224], dtype='float32') -54 ]) -``` +2. You can specify the `shape` of the model input image by setting the parameter `--img_size`, the default is `224`, which means the shape of input image is `224*224`. The above command will generate the model structure file (`inference.pdmodel`) and the model weight file (`inference.pdiparams`), and then the inference engine can be used for inference: diff --git a/docs/zh_CN/tutorials/getting_started.md b/docs/zh_CN/tutorials/getting_started.md index 05cbeb12..d870e7b5 100644 --- a/docs/zh_CN/tutorials/getting_started.md +++ b/docs/zh_CN/tutorials/getting_started.md @@ -245,14 +245,7 @@ python tools/export_model.py \ **注意**: 1. `--output_path`表示输出的inference模型文件夹路径,若`--output_path=./inference`,则会在`inference`文件夹下生成`inference.pdiparams`、`inference.pdmodel`和`inference.pdiparams.info`文件。 -2. 文件`export_model.py:line53`中,`shape`参数为模型输入图像的`shape`,默认为`224*224`,请根据实际情况修改,如下所示: -```python -50 # Please modify the 'shape' according to actual needs -51 @to_static(input_spec=[ -52 paddle.static.InputSpec( -53 shape=[None, 3, 224, 224], dtype='float32') -54 ]) -``` +2. 可以通过设置参数`--img_size`指定模型输入图像的`shape`,默认为`224`,表示图像尺寸为`224*224`,请根据实际情况修改。 上述命令将生成模型结构文件(`inference.pdmodel`)和模型权重文件(`inference.pdiparams`),然后可以使用预测引擎进行推理: -- GitLab