From 55f30c620740937f859d6aadb3aa9f47af5dc242 Mon Sep 17 00:00:00 2001 From: weishengyu Date: Fri, 18 Jun 2021 18:06:51 +0800 Subject: [PATCH] dbg --- docs/zh_CN/inference.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/zh_CN/inference.md b/docs/zh_CN/inference.md index bcb53921..7fa25bad 100644 --- a/docs/zh_CN/inference.md +++ b/docs/zh_CN/inference.md @@ -42,7 +42,7 @@ wget -P ./product_pretrain/ https://paddle-imagenet-models-name.bj.bcebos.com/dy # Global.pretrained_model 参数设置待转换的训练模型地址,不用添加文件后缀 .pdmodel,.pdopt或.pdparams。 # Global.save_inference_dir参数设置转换的模型将保存的地址。 -python3.7 tools/export_model.py -c ppcls/configs/Products/ResNet50_vd_Aliproduct.yaml -o Global.pretrained_model=./product_pretrain/product_ResNet50_vd_Aliproduct_v1.0_pretrained Global.save_inference_dir=./deploy/models/product_ResNet50_vd_aliproduct_v1.0_infer +python3.7 tools/export_model.py -c ppcls/configs/Products/ResNet50_vd_Aliproduct.yaml -o Global.pretrained_model=./product_pretrain/product_ResNet50_vd_Aliproduct_v1.0_pretrained -o Global.save_inference_dir=./deploy/models/product_ResNet50_vd_aliproduct_v1.0_infer ``` 这里也可以使用自己训练的模型。转inference模型时,使用的配置文件和训练时使用的配置文件相同。另外,还需要设置配置文件中的`Global.pretrained_model`参数,其指向训练中保存的模型参数文件。 @@ -70,11 +70,9 @@ wget -P ./cls_pretrain/ https://paddle-imagenet-models-name.bj.bcebos.com/dygrap # Global.pretrained_model 参数设置待转换的训练模型地址,不用添加文件后缀 .pdmodel,.pdopt或.pdparams。 # Global.save_inference_dir参数设置转换的模型将保存的地址。 -python3.7 tools/export_model.py -c ppcls/configs/ImageNet/ResNet/ResNet50_vd.yaml -o Global.pretrained_model=./cls_pretrain/ResNet50_vd_pretrained Global.save_inference_dir=./deploy/models/class_ResNet50_vd_ImageNet_infer +python3.7 tools/export_model.py -c ppcls/configs/ImageNet/ResNet/ResNet50_vd.yaml -o Global.pretrained_model=./cls_pretrain/ResNet50_vd_pretrained -o Global.save_inference_dir=./deploy/models/class_ResNet50_vd_ImageNet_infer ``` -**注意:**如果您是在自己的数据集上训练的模型,并且调整了中文字符的字典文件,请注意修改配置文件中的`character_dict_path`是否是所需要的字典文件。 - 转换成功后,在目录下有三个文件: ``` ├── class_ResNet50_vd_ImageNet_infer -- GitLab