提交 077111ef 编写于 作者: D dongshuilong

fix slim bugs

上级 a0ebe2e3
...@@ -66,7 +66,7 @@ cd PaddleClas ...@@ -66,7 +66,7 @@ cd PaddleClas
以CPU为例,若使用GPU,则将命令中改成`cpu`改成`gpu` 以CPU为例,若使用GPU,则将命令中改成`cpu`改成`gpu`
```bash ```bash
python3.7 deploy/slim/slim.py -m train -c ppcls/configs/slim/ResNet50_vd_quantalization.yaml -o Global.device=cpu python3.7 deploy/slim/slim.py -m train -c ppcls/configs/slim/ResNet50_vd_quantization.yaml -o Global.device=cpu
``` ```
其中`yaml`文件解析详见[参考文档](../../docs/zh_CN/tutorials/config_description.md)。为了保证精度,`yaml`文件中已经使用`pretrained model`. 其中`yaml`文件解析详见[参考文档](../../docs/zh_CN/tutorials/config_description.md)。为了保证精度,`yaml`文件中已经使用`pretrained model`.
...@@ -81,7 +81,7 @@ python3.7 -m paddle.distributed.launch \ ...@@ -81,7 +81,7 @@ python3.7 -m paddle.distributed.launch \
--gpus="0,1,2,3" \ --gpus="0,1,2,3" \
deploy/slim/slim.py \ deploy/slim/slim.py \
-m train \ -m train \
-c ppcls/configs/slim/ResNet50_vd_quantalization.yaml -c ppcls/configs/slim/ResNet50_vd_quantization.yaml
``` ```
##### 3.1.2 离线量化 ##### 3.1.2 离线量化
...@@ -131,7 +131,7 @@ python3.7 -m paddle.distributed.launch \ ...@@ -131,7 +131,7 @@ python3.7 -m paddle.distributed.launch \
python3.7 deploy/slim/slim.py \ python3.7 deploy/slim/slim.py \
-m export \ -m export \
-c ppcls/configs/slim/ResNet50_vd_prune.yaml \ -c ppcls/configs/slim/ResNet50_vd_prune.yaml \
-o Global.save_inference_dir=./inference -o Global.save_inference_dir=./inference
``` ```
......
...@@ -67,7 +67,7 @@ The training command is as follow: ...@@ -67,7 +67,7 @@ The training command is as follow:
If using GPU, change the `cpu` to `gpu` in the following command. If using GPU, change the `cpu` to `gpu` in the following command.
```bash ```bash
python3.7 deploy/slim/slim.py -m train -c ppcls/configs/slim/ResNet50_vd_quantalization.yaml -o Global.device=cpu python3.7 deploy/slim/slim.py -m train -c ppcls/configs/slim/ResNet50_vd_quantization.yaml -o Global.device=cpu
``` ```
The description of `yaml` file can be found in this [doc](../../docs/en/tutorials/config_en.md). To get better accuracy, the `pretrained model`is used in `yaml`. The description of `yaml` file can be found in this [doc](../../docs/en/tutorials/config_en.md). To get better accuracy, the `pretrained model`is used in `yaml`.
...@@ -82,7 +82,7 @@ python3.7 -m paddle.distributed.launch \ ...@@ -82,7 +82,7 @@ python3.7 -m paddle.distributed.launch \
--gpus="0,1,2,3" \ --gpus="0,1,2,3" \
deploy/slim/slim.py \ deploy/slim/slim.py \
-m train \ -m train \
-c ppcls/configs/slim/ResNet50_vd_quantalization.yaml -c ppcls/configs/slim/ResNet50_vd_quantization.yaml
``` ```
##### 3.1.2 Offline quantization ##### 3.1.2 Offline quantization
...@@ -132,7 +132,7 @@ After getting the compressed model, we can export it as inference model for pred ...@@ -132,7 +132,7 @@ After getting the compressed model, we can export it as inference model for pred
python3.7 deploy/slim/slim.py \ python3.7 deploy/slim/slim.py \
-m export \ -m export \
-c ppcls/configs/slim/ResNet50_vd_prune.yaml \ -c ppcls/configs/slim/ResNet50_vd_prune.yaml \
-o Global.save_inference_dir=./inference -o Global.save_inference_dir=./inference
``` ```
### 5. Deploy ### 5. Deploy
......
PADDLE_TRAINER_ENDPOINTS:
127.0.0.1:51466
127.0.0.1:58283
127.0.0.1:34005
127.0.0.1:58331
\ No newline at end of file
...@@ -42,7 +42,7 @@ Optimizer: ...@@ -42,7 +42,7 @@ Optimizer:
momentum: 0.9 momentum: 0.9
lr: lr:
name: Cosine name: Cosine
learning_rate: 0.1 learning_rate: 0.01
regularizer: regularizer:
name: 'L2' name: 'L2'
coeff: 0.00007 coeff: 0.00007
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册