Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleClas
提交
de1e9cab
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看板
提交
de1e9cab
编写于
6月 28, 2022
作者:
H
HydrogenSulfate
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update pact chain
上级
27dd1bc7
变更
30
显示空白变更内容
内联
并排
Showing
30 changed file
with
1052 addition
and
14 deletion
+1052
-14
ppcls/arch/slim/quant.py
ppcls/arch/slim/quant.py
+6
-0
ppcls/engine/engine.py
ppcls/engine/engine.py
+4
-3
test_tipc/README.md
test_tipc/README.md
+1
-0
test_tipc/config/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5_train_pact_infer_python.txt
...neralRecognition_PPLCNet_x2_5_train_pact_infer_python.txt
+2
-2
test_tipc/config/MobileNetV3/MobileNetV3_large_x1_0_train_pact_infer_python.txt
...eNetV3/MobileNetV3_large_x1_0_train_pact_infer_python.txt
+1
-1
test_tipc/config/PPHGNet/PPHGNet_small_train_pact_infer_python.txt
.../config/PPHGNet/PPHGNet_small_train_pact_infer_python.txt
+3
-3
test_tipc/config/PPHGNet/PPHGNet_tiny_train_pact_infer_python.txt
...c/config/PPHGNet/PPHGNet_tiny_train_pact_infer_python.txt
+53
-0
test_tipc/config/PPHGNet/PPHGNet_tiny_train_ptq_infer_python.txt
...pc/config/PPHGNet/PPHGNet_tiny_train_ptq_infer_python.txt
+53
-0
test_tipc/config/PPLCNet/PPLCNet_x0_25_train_pact_infer_python.txt
.../config/PPLCNet/PPLCNet_x0_25_train_pact_infer_python.txt
+53
-0
test_tipc/config/PPLCNet/PPLCNet_x0_25_train_ptq_infer_python.txt
...c/config/PPLCNet/PPLCNet_x0_25_train_ptq_infer_python.txt
+53
-0
test_tipc/config/PPLCNet/PPLCNet_x0_35_train_pact_infer_python.txt
.../config/PPLCNet/PPLCNet_x0_35_train_pact_infer_python.txt
+53
-0
test_tipc/config/PPLCNet/PPLCNet_x0_35_train_ptq_infer_python.txt
...c/config/PPLCNet/PPLCNet_x0_35_train_ptq_infer_python.txt
+53
-0
test_tipc/config/PPLCNet/PPLCNet_x0_5_train_pact_infer_python.txt
...c/config/PPLCNet/PPLCNet_x0_5_train_pact_infer_python.txt
+53
-0
test_tipc/config/PPLCNet/PPLCNet_x0_5_train_ptq_infer_python.txt
...pc/config/PPLCNet/PPLCNet_x0_5_train_ptq_infer_python.txt
+53
-0
test_tipc/config/PPLCNet/PPLCNet_x0_75_train_pact_infer_python.txt
.../config/PPLCNet/PPLCNet_x0_75_train_pact_infer_python.txt
+53
-0
test_tipc/config/PPLCNet/PPLCNet_x0_75_train_ptq_infer_python.txt
...c/config/PPLCNet/PPLCNet_x0_75_train_ptq_infer_python.txt
+53
-0
test_tipc/config/PPLCNet/PPLCNet_x1_0_train_pact_infer_python.txt
...c/config/PPLCNet/PPLCNet_x1_0_train_pact_infer_python.txt
+1
-1
test_tipc/config/PPLCNet/PPLCNet_x1_5_train_pact_infer_python.txt
...c/config/PPLCNet/PPLCNet_x1_5_train_pact_infer_python.txt
+53
-0
test_tipc/config/PPLCNet/PPLCNet_x1_5_train_ptq_infer_python.txt
...pc/config/PPLCNet/PPLCNet_x1_5_train_ptq_infer_python.txt
+53
-0
test_tipc/config/PPLCNet/PPLCNet_x2_0_train_pact_infer_python.txt
...c/config/PPLCNet/PPLCNet_x2_0_train_pact_infer_python.txt
+53
-0
test_tipc/config/PPLCNet/PPLCNet_x2_0_train_ptq_infer_python.txt
...pc/config/PPLCNet/PPLCNet_x2_0_train_ptq_infer_python.txt
+53
-0
test_tipc/config/PPLCNet/PPLCNet_x2_5_train_pact_infer_python.txt
...c/config/PPLCNet/PPLCNet_x2_5_train_pact_infer_python.txt
+53
-0
test_tipc/config/PPLCNet/PPLCNet_x2_5_train_ptq_infer_python.txt
...pc/config/PPLCNet/PPLCNet_x2_5_train_ptq_infer_python.txt
+53
-0
test_tipc/config/PPLCNetV2/PPLCNetV2_base_train_pact_infer_python.txt
...nfig/PPLCNetV2/PPLCNetV2_base_train_pact_infer_python.txt
+1
-1
test_tipc/config/ResNet/ResNet50_train_pact_infer_python.txt
test_tipc/config/ResNet/ResNet50_train_pact_infer_python.txt
+1
-1
test_tipc/config/ResNet/ResNet50_train_ptq_infer_python.txt
test_tipc/config/ResNet/ResNet50_train_ptq_infer_python.txt
+60
-0
test_tipc/config/ResNet/ResNet50_vd_train_pact_infer_python.txt
...ipc/config/ResNet/ResNet50_vd_train_pact_infer_python.txt
+1
-1
test_tipc/config/SwinTransformer/SwinTransformer_tiny_patch4_window7_224_train_pact_infer_python.txt
...ormer_tiny_patch4_window7_224_train_pact_infer_python.txt
+1
-1
test_tipc/docs/test_train_pact_inference_python.md
test_tipc/docs/test_train_pact_inference_python.md
+106
-0
test_tipc/prepare.sh
test_tipc/prepare.sh
+16
-0
未找到文件。
ppcls/arch/slim/quant.py
浏览文件 @
de1e9cab
...
...
@@ -48,6 +48,12 @@ def quantize_model(config, model, mode="train"):
QUANT_CONFIG
[
"activation_preprocess_type"
]
=
"PACT"
if
mode
in
[
"infer"
,
"export"
]:
QUANT_CONFIG
[
'activation_preprocess_type'
]
=
None
# for rep nets, convert to reparameterized model first
for
layer
in
model
.
sublayers
():
if
hasattr
(
layer
,
"rep"
):
layer
.
rep
()
model
.
quanter
=
QAT
(
config
=
QUANT_CONFIG
)
model
.
quanter
.
quantize
(
model
)
logger
.
info
(
"QAT model summary:"
)
...
...
ppcls/engine/engine.py
浏览文件 @
de1e9cab
...
...
@@ -465,6 +465,7 @@ class Engine(object):
model
.
eval
()
# for rep nets
if
"Slim"
not
in
self
.
config
or
self
.
config
[
"Slim"
][
"quant"
][
"name"
]
!=
"pact"
:
for
layer
in
self
.
model
.
sublayers
():
if
hasattr
(
layer
,
"rep"
):
layer
.
rep
()
...
...
test_tipc/README.md
浏览文件 @
de1e9cab
...
...
@@ -107,6 +107,7 @@ bash test_tipc/test_train_inference_python.sh ./test_tipc/configs/MobileNetV3/Mo
各功能测试中涉及混合精度、裁剪、量化等训练相关,及mkldnn、Tensorrt等多种预测相关参数配置,请点击下方相应链接了解更多细节和使用教程:
-
[
test_train_inference_python 使用
](
docs/test_train_inference_python.md
)
:测试基于Python的模型训练、评估、推理等基本功能,包括裁剪、量化、蒸馏。
-
[
test_train_pact_inference_python 使用
](
docs/test_train_pact_inference_python.md
)
:测试基于Python的模型PACT在线量化等基本功能。
-
[
test_inference_cpp 使用
](
docs/test_inference_cpp.md
)
:测试基于C++的模型推理。
-
[
test_serving 使用
](
docs/test_serving.md
)
:测试基于Paddle Serving的服务化部署功能。
-
[
test_lite_arm_cpu_cpp 使用
](
docs/test_lite_arm_cpu_cpp.md
)
: 测试基于Paddle-Lite的ARM CPU端c++预测部署功能.
...
...
test_tipc/config/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5_train_pact_infer_python.txt
浏览文件 @
de1e9cab
...
...
@@ -14,7 +14,7 @@ null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o
Arch.pretrained=True -o Optimizer.lr.learning_rate=0.004
pact_train:tools/train.py -c ppcls/configs/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o
Optimizer.lr.learning_rate=0.004 -o Global.pretrained_model="pretrained_model/general_PPLCNet_x2_5_pretrained_v1.0"
fpgm_train:null
distill_train:null
null:null
...
...
test_tipc/config/MobileNetV3/MobileNetV3_large_x1_0_train_pact_infer_python.txt
浏览文件 @
de1e9cab
...
...
@@ -14,7 +14,7 @@ null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o
Arch.pretrained=True -o Optimizer.lr.learning_rate=0.01
pact_train:tools/train.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o
Optimizer.lr.learning_rate=0.01 -o Global.pretrained_model="pretrained_model/MobileNetV3_large_x1_0_pretrained"
fpgm_train:null
distill_train:null
to_static_train:-o Global.to_static=True
...
...
test_tipc/config/PPHGNet/PPHGNet_small_train_pact_infer_python.txt
浏览文件 @
de1e9cab
...
...
@@ -14,21 +14,21 @@ null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_small
_pact.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Arch.pretrained=True -o Optimizer.lr.learning_rate=0.01
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_small
.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.01 -o Global.pretrained_model="pretrained_model/PPHGNet_small_pretrained" -o AMP=None
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_small
_pact
.yaml -o Slim.quant.name=pact
eval:tools/eval.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_small.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_small
_pact
.yaml -o Slim.quant.name=pact
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_small.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
...
...
test_tipc/config/PPHGNet/PPHGNet_tiny_train_pact_infer_python.txt
0 → 100644
浏览文件 @
de1e9cab
===========================train_params===========================
model_name:PPHGNet_tiny
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_tiny.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.01 -o Global.pretrained_model="pretrained_model/PPHGNet_tiny_pretrained" -o AMP=None
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_tiny.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_tiny.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPHGNet_tiny_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml -o PreProcess.transform_ops.0.ResizeImage.resize_short=236
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
test_tipc/config/PPHGNet/PPHGNet_tiny_train_ptq_infer_python.txt
0 → 100644
浏览文件 @
de1e9cab
===========================train_params===========================
model_name:PPHGNet_tiny
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_tiny.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_tiny.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_tiny.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_tiny.yaml -o Global.save_inference_dir=./PPHGNet_tiny_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPHGNet_tiny_infer.tar
infer_model:./PPHGNet_tiny_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml -o PreProcess.transform_ops.0.ResizeImage.resize_short=236
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
test_tipc/config/PPLCNet/PPLCNet_x0_25_train_pact_infer_python.txt
0 → 100644
浏览文件 @
de1e9cab
===========================train_params===========================
model_name:PPLCNet_x0_25
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_25.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.08 -o Global.pretrained_model="pretrained_model/PPLCNet_x0_25_pretrained"
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_25.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_25.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPLCNet_x0_25_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
test_tipc/config/PPLCNet/PPLCNet_x0_25_train_ptq_infer_python.txt
0 → 100644
浏览文件 @
de1e9cab
===========================train_params===========================
model_name:PPLCNet_x0_25
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_25.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_25.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_25.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_25.yaml -o Global.save_inference_dir=./PPLCNet_x0_25_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPLCNet_x0_25_infer.tar
infer_model:./PPLCNet_x0_25_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
test_tipc/config/PPLCNet/PPLCNet_x0_35_train_pact_infer_python.txt
0 → 100644
浏览文件 @
de1e9cab
===========================train_params===========================
model_name:PPLCNet_x0_35
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_35.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.08 -o Global.pretrained_model="pretrained_model/PPLCNet_x0_35_pretrained"
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_35.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_35.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPLCNet_x0_35_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
test_tipc/config/PPLCNet/PPLCNet_x0_35_train_ptq_infer_python.txt
0 → 100644
浏览文件 @
de1e9cab
===========================train_params===========================
model_name:PPLCNet_x0_35
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_35.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_35.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_35.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_35.yaml -o Global.save_inference_dir=./PPLCNet_x0_35_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPLCNet_x0_35_infer.tar
infer_model:./PPLCNet_x0_35_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
test_tipc/config/PPLCNet/PPLCNet_x0_5_train_pact_infer_python.txt
0 → 100644
浏览文件 @
de1e9cab
===========================train_params===========================
model_name:PPLCNet_x0_5
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.08 -o Global.pretrained_model="pretrained_model/PPLCNet_x0_5_pretrained"
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_5.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_5.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPLCNet_x0_5_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
test_tipc/config/PPLCNet/PPLCNet_x0_5_train_ptq_infer_python.txt
0 → 100644
浏览文件 @
de1e9cab
===========================train_params===========================
model_name:PPLCNet_x0_5
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_5.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_5.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_5.yaml -o Global.save_inference_dir=./PPLCNet_x0_5_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPLCNet_x0_5_infer.tar
infer_model:./PPLCNet_x0_5_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
test_tipc/config/PPLCNet/PPLCNet_x0_75_train_pact_infer_python.txt
0 → 100644
浏览文件 @
de1e9cab
===========================train_params===========================
model_name:PPLCNet_x0_75
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_75.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.08 -o Global.pretrained_model="pretrained_model/PPLCNet_x0_75_pretrained"
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_75.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_75.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPLCNet_x0_75_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
test_tipc/config/PPLCNet/PPLCNet_x0_75_train_ptq_infer_python.txt
0 → 100644
浏览文件 @
de1e9cab
===========================train_params===========================
model_name:PPLCNet_x0_75
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_75.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_75.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_75.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_75.yaml -o Global.save_inference_dir=./PPLCNet_x0_75_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPLCNet_x0_75_infer.tar
infer_model:./PPLCNet_x0_75_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
test_tipc/config/PPLCNet/PPLCNet_x1_0_train_pact_infer_python.txt
浏览文件 @
de1e9cab
...
...
@@ -14,7 +14,7 @@ null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_0.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o
Arch.pretrained=True -o Optimizer.lr.learning_rate=0.08
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_0.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o
Optimizer.lr.learning_rate=0.08 -o Global.pretrained_model="pretrained_model/PPLCNet_x1_0_pretrained"
fpgm_train:null
distill_train:null
null:null
...
...
test_tipc/config/PPLCNet/PPLCNet_x1_5_train_pact_infer_python.txt
0 → 100644
浏览文件 @
de1e9cab
===========================train_params===========================
model_name:PPLCNet_x1_5
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.08 -o Global.pretrained_model="pretrained_model/PPLCNet_x1_5_pretrained"
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_5.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_5.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPLCNet_x1_5_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
test_tipc/config/PPLCNet/PPLCNet_x1_5_train_ptq_infer_python.txt
0 → 100644
浏览文件 @
de1e9cab
===========================train_params===========================
model_name:PPLCNet_x1_5
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_5.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_5.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_5.yaml -o Global.save_inference_dir=./PPLCNet_x1_5_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPLCNet_x1_5_infer.tar
infer_model:./PPLCNet_x1_5_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
test_tipc/config/PPLCNet/PPLCNet_x2_0_train_pact_infer_python.txt
0 → 100644
浏览文件 @
de1e9cab
===========================train_params===========================
model_name:PPLCNet_x2_0
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_0.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.08 -o Global.pretrained_model="pretrained_model/PPLCNet_x2_0_pretrained"
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_0.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_0.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPLCNet_x2_0_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
test_tipc/config/PPLCNet/PPLCNet_x2_0_train_ptq_infer_python.txt
0 → 100644
浏览文件 @
de1e9cab
===========================train_params===========================
model_name:PPLCNet_x2_0
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_0.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_0.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_0.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_0.yaml -o Global.save_inference_dir=./PPLCNet_x2_0_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPLCNet_x2_0_infer.tar
infer_model:./PPLCNet_x2_0_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
test_tipc/config/PPLCNet/PPLCNet_x2_5_train_pact_infer_python.txt
0 → 100644
浏览文件 @
de1e9cab
===========================train_params===========================
model_name:PPLCNet_x2_5
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.08 -o Global.pretrained_model="pretrained_model/PPLCNet_x2_5_pretrained"
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_5.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_5.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPLCNet_x2_5_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
test_tipc/config/PPLCNet/PPLCNet_x2_5_train_ptq_infer_python.txt
0 → 100644
浏览文件 @
de1e9cab
===========================train_params===========================
model_name:PPLCNet_x2_5
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_5.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_5.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_5.yaml -o Global.save_inference_dir=./PPLCNet_x2_5_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPLCNet_x2_5_infer.tar
infer_model:./PPLCNet_x2_5_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
test_tipc/config/PPLCNetV2/PPLCNetV2_base_train_pact_infer_python.txt
浏览文件 @
de1e9cab
...
...
@@ -14,7 +14,7 @@ null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNetV2/PPLCNetV2_base.yaml -o Global.seed=1234 -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o
Arch.pretrained=True -o Optimizer.lr.learning_rate=0.08
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNetV2/PPLCNetV2_base.yaml -o Global.seed=1234 -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o
Optimizer.lr.learning_rate=0.08 -o Global.pretrained_model="pretrained_model/PPLCNetV2_base_pretrained"
fpgm_train:null
distill_train:null
null:null
...
...
test_tipc/config/ResNet/ResNet50_train_pact_infer_python.txt
浏览文件 @
de1e9cab
...
...
@@ -14,7 +14,7 @@ null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/ResNet/ResNet50.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o
Arch.pretrained=True -o Optimizer.lr.learning_rate=0.01
pact_train:tools/train.py -c ppcls/configs/ImageNet/ResNet/ResNet50.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o
Optimizer.lr.learning_rate=0.01 -o Global.pretrained_model="pretrained_model/ResNet50_pretrained"
fpgm_train:null
distill_train:null
to_static_train:-o Global.to_static=True
...
...
test_tipc/config/ResNet/ResNet50_train_ptq_infer_python.txt
0 → 100644
浏览文件 @
de1e9cab
===========================train_params===========================
model_name:ResNet50
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=200
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/ResNet/ResNet50.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:null
fpgm_train:null
distill_train:null
to_static_train:-o Global.to_static=True
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/ResNet/ResNet50.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/ResNet/ResNet50.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/ResNet/ResNet50.yaml -o Global.save_inference_dir=./ResNet50_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/ResNet50_infer.tar
infer_model:./ResNet50_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
null:null
===========================train_benchmark_params==========================
batch_size:128
fp_items:fp32
epoch:1
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:FLAGS_eager_delete_tensor_gb=0.0;FLAGS_fraction_of_gpu_memory_to_use=0.98;FLAGS_conv_workspace_size_limit=4096
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
test_tipc/config/ResNet/ResNet50_vd_train_pact_infer_python.txt
浏览文件 @
de1e9cab
...
...
@@ -14,7 +14,7 @@ null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/ResNet/ResNet50_vd.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o
Arch.pretrained=True -o Optimizer.lr.learning_rate=0.01
pact_train:tools/train.py -c ppcls/configs/ImageNet/ResNet/ResNet50_vd.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o
Optimizer.lr.learning_rate=0.01 -o Global.pretrained_model="pretrained_model/ResNet50_vd_pretrained"
fpgm_train:null
distill_train:null
to_static_train:-o Global.to_static=True
...
...
test_tipc/config/SwinTransformer/SwinTransformer_tiny_patch4_window7_224_train_pact_infer_python.txt
浏览文件 @
de1e9cab
...
...
@@ -14,7 +14,7 @@ null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/SwinTransformer/SwinTransformer_tiny_patch4_window7_224.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o
Arch.pretrained=True -o Optimizer.lr.learning_rate=0.01
pact_train:tools/train.py -c ppcls/configs/ImageNet/SwinTransformer/SwinTransformer_tiny_patch4_window7_224.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o
Optimizer.lr.learning_rate=0.01 -o Global.pretrained_model="pretrained_model/SwinTransformer_tiny_patch4_window7_224_pretrained"
fpgm_train:null
distill_train:null
null:null
...
...
test_tipc/docs/test_train_pact_inference_python.md
0 → 100644
浏览文件 @
de1e9cab
# Linux GPU/CPU PACT量化训练推理测试
Linux GPU/CPU PACT量化训练推理测试的主程序为
`test_train_inference_python.sh`
,可以测试基于Python的模型PACT在线量化等基本功能。
## 1. 测试结论汇总
-
训练相关:
| 算法名称 | 模型名称 | 单机单卡 |
| :-------------: | :-------------------------------------: | :----------: |
| MobileNetV3 | MobileNetV3_large_x1_0 | PACT量化训练 |
| PP-ShiTu | GeneralRecognition_PPLCNet_x2_5 | PACT量化训练 |
| PPHGNet | PPHGNet_small | PACT量化训练 |
| PPHGNet | PPHGNet_tiny | PACT量化训练 |
| PPLCNet | PPLCNet_x0_25 | PACT量化训练 |
| PPLCNet | PPLCNet_x0_35 | PACT量化训练 |
| PPLCNet | PPLCNet_x0_5 | PACT量化训练 |
| PPLCNet | PPLCNet_x0_75 | PACT量化训练 |
| PPLCNet | PPLCNet_x1_0 | PACT量化训练 |
| PPLCNet | PPLCNet_x1_5 | PACT量化训练 |
| PPLCNet | PPLCNet_x2_0 | PACT量化训练 |
| PPLCNet | PPLCNet_x2_5 | PACT量化训练 |
| PPLCNetV2 | PPLCNetV2_base | PACT量化训练 |
| ResNet | ResNet50 | PACT量化训练 |
| ResNet | ResNet50_vd | PACT量化训练 |
| SwinTransformer | SwinTransformer_tiny_patch4_window7_224 | PACT量化训练 |
-
推理相关:
| 算法名称 | 模型名称 | device_CPU | device_GPU | batchsize |
| :-------------: | :-------------------------------------: | :--------: | :--------: | :-------: |
| MobileNetV3 | MobileNetV3_large_x1_0 | 支持 | 支持 | 1 |
| PP-ShiTu | GeneralRecognition_PPLCNet_x2_5 | 支持 | 支持 | 1 |
| PPHGNet | PPHGNet_small | 支持 | 支持 | 1 |
| PPHGNet | PPHGNet_tiny | 支持 | 支持 | 1 |
| PPLCNet | PPLCNet_x0_25 | 支持 | 支持 | 1 |
| PPLCNet | PPLCNet_x0_35 | 支持 | 支持 | 1 |
| PPLCNet | PPLCNet_x0_5 | 支持 | 支持 | 1 |
| PPLCNet | PPLCNet_x0_75 | 支持 | 支持 | 1 |
| PPLCNet | PPLCNet_x1_0 | 支持 | 支持 | 1 |
| PPLCNet | PPLCNet_x1_5 | 支持 | 支持 | 1 |
| PPLCNet | PPLCNet_x2_0 | 支持 | 支持 | 1 |
| PPLCNet | PPLCNet_x2_5 | 支持 | 支持 | 1 |
| PPLCNetV2 | PPLCNetV2_base | 支持 | 支持 | 1 |
| ResNet | ResNet50 | 支持 | 支持 | 1 |
| ResNet | ResNet50_vd | 支持 | 支持 | 1 |
| SwinTransformer | SwinTransformer_tiny_patch4_window7_224 | 支持 | 支持 | 1 |
## 2. 测试流程
一下测试流程以 MobileNetV3_large_x1_0 模型为例。
### 2.1 准备环境
-
安装PaddlePaddle:如果您已经安装了2.2或者以上版本的paddlepaddle,那么无需运行下面的命令安装paddlepaddle。
```
bash
# 需要安装2.2及以上版本的Paddle
# 安装GPU版本的Paddle
python3.7
-m
pip
install
paddlepaddle-gpu
==
2.2.0
# 安装CPU版本的Paddle
python3.7
-m
pip
install
paddlepaddle
==
2.2.0
```
-
安装PaddleSlim
```
bash
python3.7
-m
pip
install
paddleslim
==
2.2.0
```
-
安装依赖
```
bash
python3.7
-m
pip
install
-r
requirements.txt
-i
https://pypi.tuna.tsinghua.edu.cn/simple
```
-
安装AutoLog(规范化日志输出工具)
```
bash
python3.7
-m
pip
install
https://paddleocr.bj.bcebos.com/libs/auto_log-1.2.0-py3-none-any.whl
```
### 2.2 准备数据和模型
```
bash
bash test_tipc/prepare.sh test_tipc/config/PPLCNetV2/PPLCNetV2_base_train_pact_infer_python.txt lite_train_lite_infer
```
在线量化的操作流程,可参考
[
文档
](
../../deploy/slim/README.md
)
。
### 2.3 功能测试
以
`MobileNetV3_large_x1_0`
的
`Linux GPU/CPU PACT在线量化训练推理测试`
为例,命令如下所示。
```
bash
bash test_tipc/test_train_inference_python.sh test_tipc/config/PPLCNetV2/PPLCNetV2_base_train_pact_infer_python.txt lite_train_lite_infer
```
输出结果如下,表示命令运行成功。
```
log
Run successfully with command - MobileNetV3_large_x1_0 - python3.7 tools/train.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.01 -o Global.device=gpu -o Global.output_dir=./test_tipc/output/MobileNetV3_large_x1_0/lite_train_lite_infer/pact_train_gpus_0_autocast_null -o Global.epochs=2 -o DataLoader.Train.sampler.batch_size=8 !
Run successfully with command - MobileNetV3_large_x1_0 - python3.7 tools/eval.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml -o Slim.quant.name=pact -o Global.pretrained_model=./test_tipc/output/MobileNetV3_large_x1_0/lite_train_lite_infer/pact_train_gpus_0_autocast_null/MobileNetV3_large_x1_0/latest -o Global.device=gpu !
Run successfully with command - MobileNetV3_large_x1_0 - python3.7 tools/export_model.py -c ppcls/configs/slim/MobileNetV3_large_x1_0_quantization.yaml -o Slim.quant.name=pact -o Global.pretrained_model=./test_tipc/output/MobileNetV3_large_x1_0/lite_train_lite_infer/pact_train_gpus_0_autocast_null/MobileNetV3_large_x1_0/latest -o Global.save_inference_dir=./test_tipc/output/MobileNetV3_large_x1_0/lite_train_lite_infer/pact_train_gpus_0_autocast_null!
Run successfully with command - MobileNetV3_large_x1_0 - python3.7 python/predict_cls.py -c configs/inference_cls.yaml -o Global.use_gpu=True -o Global.use_tensorrt=False -o Global.use_fp16=False -o Global.inference_model_dir=.././test_tipc/output/MobileNetV3_large_x1_0/lite_train_lite_infer/pact_train_gpus_0_autocast_null -o Global.batch_size=1 -o Global.infer_imgs=../dataset/ILSVRC2012/val -o Global.benchmark=True > .././test_tipc/output/MobileNetV3_large_x1_0/lite_train_lite_infer/infer_gpu_usetrt_False_precision_False_batchsize_1.log 2>&1 !
Run successfully with command - MobileNetV3_large_x1_0 - python3.7 python/predict_cls.py -c configs/inference_cls.yaml -o Global.use_gpu=False -o Global.enable_mkldnn=False -o Global.cpu_num_threads=1 -o Global.inference_model_dir=.././test_tipc/output/MobileNetV3_large_x1_0/lite_train_lite_infer/pact_train_gpus_0_autocast_null -o Global.batch_size=1 -o Global.infer_imgs=../dataset/ILSVRC2012/val -o Global.benchmark=True > .././test_tipc/output/MobileNetV3_large_x1_0/lite_train_lite_infer/infer_cpu_usemkldnn_False_threads_1_batchsize_1.log 2>&1 !
```
同时,测试过程中的日志保存在
`PaddleClas/test_tipc/output/MobileNetV3_large_x1_0/lite_train_lite_infer`
下。
如果运行失败,也会在终端中输出运行失败的日志信息以及对应的运行命令。可以基于该命令,分析运行失败的原因。
test_tipc/prepare.sh
浏览文件 @
de1e9cab
...
...
@@ -183,6 +183,14 @@ if [[ ${MODE} = "lite_train_lite_infer" ]] || [[ ${MODE} = "lite_train_whole_inf
mv
val.txt val_list.txt
cp
-r
train/
*
val/
cd
../../
if
[[
${
FILENAME
}
=
~
"pact_infer"
]]
;
then
# download pretrained model for PACT training
pretrpretrained_model_url
=
$(
func_parser_value
"
${
lines
[35]
}
"
)
mkdir
pretrained_model
cd
pretrained_model
wget
-nc
${
pretrpretrained_model_url
}
--no-check-certificate
cd
..
fi
elif
[[
${
MODE
}
=
"whole_infer"
]]
;
then
# download data
if
[[
${
model_name
}
=
~
"GeneralRecognition"
]]
;
then
...
...
@@ -232,6 +240,14 @@ elif [[ ${MODE} = "whole_train_whole_infer" ]]; then
mv
train.txt train_list.txt
mv
test.txt val_list.txt
cd
../../
if
[[
${
FILENAME
}
=
~
"pact_infer"
]]
;
then
# download pretrained model for PACT training
pretrpretrained_model_url
=
$(
func_parser_value
"
${
lines
[35]
}
"
)
mkdir
pretrained_model
cd
pretrained_model
wget
-nc
${
pretrpretrained_model_url
}
--no-check-certificate
cd
..
fi
fi
if
[[
${
MODE
}
=
"serving_infer"
]]
;
then
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录