Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleClas
提交
077111ef
P
PaddleClas
项目概览
PaddlePaddle
/
PaddleClas
大约 1 年 前同步成功
通知
115
Star
4999
Fork
1114
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
19
列表
看板
标记
里程碑
合并请求
6
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleClas
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
19
Issue
19
列表
看板
标记
里程碑
合并请求
6
合并请求
6
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
077111ef
编写于
7月 28, 2021
作者:
D
dongshuilong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix slim bugs
上级
a0ebe2e3
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
12 addition
and
7 deletion
+12
-7
deploy/slim/README.md
deploy/slim/README.md
+3
-3
deploy/slim/README_en.md
deploy/slim/README_en.md
+3
-3
log/endpoints.log
log/endpoints.log
+5
-0
ppcls/configs/slim/ResNet50_vd_quantization.yaml
ppcls/configs/slim/ResNet50_vd_quantization.yaml
+1
-1
未找到文件。
deploy/slim/README.md
浏览文件 @
077111ef
...
...
@@ -66,7 +66,7 @@ cd PaddleClas
以CPU为例,若使用GPU,则将命令中改成
`cpu`
改成
`gpu`
```
bash
python3.7 deploy/slim/slim.py
-m
train
-c
ppcls/configs/slim/ResNet50_vd_quant
al
ization.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`
.
...
...
@@ -81,7 +81,7 @@ python3.7 -m paddle.distributed.launch \
--gpus
=
"0,1,2,3"
\
deploy/slim/slim.py
\
-m
train
\
-c
ppcls/configs/slim/ResNet50_vd_quant
al
ization.yaml
-c
ppcls/configs/slim/ResNet50_vd_quantization.yaml
```
##### 3.1.2 离线量化
...
...
@@ -131,7 +131,7 @@ python3.7 -m paddle.distributed.launch \
python3.7 deploy/slim/slim.py
\
-m
export
\
-c
ppcls/configs/slim/ResNet50_vd_prune.yaml
\
-o
Global.save_inference_dir
=
./inference
-o
Global.save_inference_dir
=
./inference
```
...
...
deploy/slim/README_en.md
浏览文件 @
077111ef
...
...
@@ -67,7 +67,7 @@ The training command is as follow:
If using GPU, change the
`cpu`
to
`gpu`
in the following command.
```
bash
python3.7 deploy/slim/slim.py
-m
train
-c
ppcls/configs/slim/ResNet50_vd_quant
al
ization.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`
.
...
...
@@ -82,7 +82,7 @@ python3.7 -m paddle.distributed.launch \
--gpus
=
"0,1,2,3"
\
deploy/slim/slim.py
\
-m
train
\
-c
ppcls/configs/slim/ResNet50_vd_quant
al
ization.yaml
-c
ppcls/configs/slim/ResNet50_vd_quantization.yaml
```
##### 3.1.2 Offline quantization
...
...
@@ -132,7 +132,7 @@ After getting the compressed model, we can export it as inference model for pred
python3.7 deploy/slim/slim.py
\
-m
export
\
-c
ppcls/configs/slim/ResNet50_vd_prune.yaml
\
-o
Global.save_inference_dir
=
./inference
-o
Global.save_inference_dir
=
./inference
```
### 5. Deploy
...
...
log/endpoints.log
0 → 100644
浏览文件 @
077111ef
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
ppcls/configs/slim/ResNet50_vd_quantization.yaml
浏览文件 @
077111ef
...
...
@@ -42,7 +42,7 @@ Optimizer:
momentum
:
0.9
lr
:
name
:
Cosine
learning_rate
:
0.1
learning_rate
:
0.
0
1
regularizer
:
name
:
'
L2'
coeff
:
0.00007
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录