diff --git a/docs/en/algorithm_introduction/ImageNet_models_en.md b/docs/en/algorithm_introduction/ImageNet_models_en.md
index b78061267b65d44a5c175368a2575bc2fc277f50..5a8ba0ac71ea4d4f4b0d89e7a182163d17a83f5c 100644
--- a/docs/en/algorithm_introduction/ImageNet_models_en.md
+++ b/docs/en/algorithm_introduction/ImageNet_models_en.md
@@ -541,9 +541,9 @@ The accuracy and speed indicators of MobileViT series models are shown in the fo
| Model | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | time(ms)
bs=8 | FLOPs(M) | Params(M) | Pretrained Model Download Address | Inference Model Download Address |
| ---------- | --------- | --------- | ---------------- | ---------------- | -------- | --------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
-| MobileViT_XXS | 0.6867 | 0.8878 | - | - | - | 1849.35 | 5.59 | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileViT_XXS_pretrained.pdparams) | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileViT_XXS_infer.tar) |
+| MobileViT_XXS | 0.6867 | 0.8878 | - | - | - | 337.24 | 1.28 | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileViT_XXS_pretrained.pdparams) | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileViT_XXS_infer.tar) |
| MobileViT_XS | 0.7454 | 0.9227 | - | - | - | 930.75 | 2.33 | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileViT_XS_pretrained.pdparams) | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileViT_XS_infer.tar) |
-| MobileViT_S | 0.7814 | 0.9413 | - | - | - | 337.24 | 1.28 | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileViT_S_pretrained.pdparams) | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileViT_S_infer.tar) |
+| MobileViT_S | 0.7814 | 0.9413 | - | - | - | 1849.35 | 5.59 | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileViT_S_pretrained.pdparams) | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileViT_S_infer.tar) |
diff --git a/docs/en/models/MobileViT_en.md b/docs/en/models/MobileViT_en.md
index 96b5e8260e51cf062b7da74b449140eb1bc68dd0..2aebdebfe9821e46688662fe3e6b4a460bcec1db 100644
--- a/docs/en/models/MobileViT_en.md
+++ b/docs/en/models/MobileViT_en.md
@@ -18,6 +18,6 @@ MobileViT is a lightweight visual Transformer network that can be used as a gene
| Models | Top1 | Top5 | Reference
top1 | Reference
top5 | FLOPs
(M) | Params
(M) |
|:--:|:--:|:--:|:--:|:--:|:--:|:--:|
-| MobileViT_XXS | 0.6867 | 0.8878 | 0.690 | - | 1849.35 | 5.59 |
+| MobileViT_XXS | 0.6867 | 0.8878 | 0.690 | - | 337.24 | 1.28 |
| MobileViT_XS | 0.7454 | 0.9227 | 0.747 | - | 930.75 | 2.33 |
-| MobileViT_S | 0.7814 | 0.9413 | 0.783 | - | 337.24 | 1.28 |
+| MobileViT_S | 0.7814 | 0.9413 | 0.783 | - | 1849.35 | 5.59 |
diff --git a/docs/zh_CN/algorithm_introduction/ImageNet_models.md b/docs/zh_CN/algorithm_introduction/ImageNet_models.md
index ad32788a8579ccf22ddb72dd40f9f0a8daa019d9..73ac0e8534c1370f7ff6e0cc9ceaaeac6b364ed6 100644
--- a/docs/zh_CN/algorithm_introduction/ImageNet_models.md
+++ b/docs/zh_CN/algorithm_introduction/ImageNet_models.md
@@ -568,9 +568,9 @@ ViT(Vision Transformer) 与 DeiT(Data-efficient Image Transformers)系列模
| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | time(ms)
bs=8 | FLOPs(M) | Params(M) | 预训练模型下载地址 | inference模型下载地址 |
| ---------- | --------- | --------- | ---------------- | ---------------- | -------- | --------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
-| MobileViT_XXS | 0.6867 | 0.8878 | - | - | - | 1849.35 | 5.59 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileViT_XXS_pretrained.pdparams) | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileViT_XXS_infer.tar) |
+| MobileViT_XXS | 0.6867 | 0.8878 | - | - | - | 337.24 | 1.28 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileViT_XXS_pretrained.pdparams) | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileViT_XXS_infer.tar) |
| MobileViT_XS | 0.7454 | 0.9227 | - | - | - | 930.75 | 2.33 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileViT_XS_pretrained.pdparams) | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileViT_XS_infer.tar) |
-| MobileViT_S | 0.7814 | 0.9413 | - | - | - | 337.24 | 1.28 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileViT_S_pretrained.pdparams) | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileViT_S_infer.tar) |
+| MobileViT_S | 0.7814 | 0.9413 | - | - | - | 1849.35 | 5.59 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileViT_S_pretrained.pdparams) | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileViT_S_infer.tar) |
diff --git a/docs/zh_CN/models/MobileViT.md b/docs/zh_CN/models/MobileViT.md
index 2980fb38f80c412a18b73674eac7cd3fd7793ce5..8d225c58a9fe604f395c7620357e765954378328 100644
--- a/docs/zh_CN/models/MobileViT.md
+++ b/docs/zh_CN/models/MobileViT.md
@@ -17,6 +17,6 @@ MobileViT 是一个轻量级的视觉 Transformer 网络,可以用作计算机
| Models | Top1 | Top5 | Reference
top1 | Reference
top5 | FLOPs
(M) | Params
(M) |
|:--:|:--:|:--:|:--:|:--:|:--:|:--:|
-| MobileViT_XXS | 0.6867 | 0.8878 | 0.690 | - | 1849.35 | 5.59 |
+| MobileViT_XXS | 0.6867 | 0.8878 | 0.690 | - | 337.24 | 1.28 |
| MobileViT_XS | 0.7454 | 0.9227 | 0.747 | - | 930.75 | 2.33 |
-| MobileViT_S | 0.7814 | 0.9413 | 0.783 | - | 337.24 | 1.28 |
+| MobileViT_S | 0.7814 | 0.9413 | 0.783 | - | 1849.35 | 5.59 |
diff --git a/ppcls/arch/backbone/model_zoo/vision_transformer.py b/ppcls/arch/backbone/model_zoo/vision_transformer.py
index d3f149d232d644825d4ed2f8b51a47ad9f80335f..35796e5e9610587d794428dc8284cab5bae3d554 100644
--- a/ppcls/arch/backbone/model_zoo/vision_transformer.py
+++ b/ppcls/arch/backbone/model_zoo/vision_transformer.py
@@ -62,7 +62,7 @@ def drop_path(x, drop_prob=0., training=False):
return x
keep_prob = paddle.to_tensor(1 - drop_prob)
shape = (paddle.shape(x)[0], ) + (1, ) * (x.ndim - 1)
- random_tensor = keep_prob + paddle.rand(shape, dtype=x.dtype)
+ random_tensor = keep_prob + paddle.rand(shape).astype(x.dtype)
random_tensor = paddle.floor(random_tensor) # binarize
output = x.divide(keep_prob) * random_tensor
return output
diff --git a/ppcls/engine/evaluation/retrieval.py b/ppcls/engine/evaluation/retrieval.py
index f68902285cae9896f76eca30cbabbbacaf5a2b3f..02cae1670bbe1255a84fcf80c3097c5c020c917f 100644
--- a/ppcls/engine/evaluation/retrieval.py
+++ b/ppcls/engine/evaluation/retrieval.py
@@ -159,7 +159,15 @@ def cal_feature(engine, name='gallery'):
if len(batch) == 3:
has_unique_id = True
batch[2] = batch[2].reshape([-1, 1]).astype("int64")
- out = engine.model(batch[0], batch[1])
+ if engine.amp and engine.amp_eval:
+ with paddle.amp.auto_cast(
+ custom_black_list={
+ "flatten_contiguous_range", "greater_than"
+ },
+ level=engine.amp_level):
+ out = engine.model(batch[0], batch[1])
+ else:
+ out = engine.model(batch[0], batch[1])
if "Student" in out:
out = out["Student"]
diff --git a/ppcls/optimizer/optimizer.py b/ppcls/optimizer/optimizer.py
index be6fa9f70ab8c50422e8f068b8e1c58a3b1c53e9..c0403cf95cdaf442b6fdaeea54d21a2382e3858b 100644
--- a/ppcls/optimizer/optimizer.py
+++ b/ppcls/optimizer/optimizer.py
@@ -16,9 +16,9 @@ from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
-from paddle import optimizer as optim
-import paddle
+import inspect
+from paddle import optimizer as optim
from ppcls.utils import logger
@@ -49,21 +49,32 @@ class SGD(object):
learning_rate=0.001,
weight_decay=None,
grad_clip=None,
+ multi_precision=False,
name=None):
self.learning_rate = learning_rate
self.weight_decay = weight_decay
self.grad_clip = grad_clip
+ self.multi_precision = multi_precision
self.name = name
def __call__(self, model_list):
# model_list is None in static graph
parameters = sum([m.parameters() for m in model_list],
[]) if model_list else None
- opt = optim.SGD(learning_rate=self.learning_rate,
- parameters=parameters,
- weight_decay=self.weight_decay,
- grad_clip=self.grad_clip,
- name=self.name)
+ argspec = inspect.getargspec(optim.SGD.__init__).args
+ if 'multi_precision' in argspec:
+ opt = optim.SGD(learning_rate=self.learning_rate,
+ parameters=parameters,
+ weight_decay=self.weight_decay,
+ grad_clip=self.grad_clip,
+ multi_precision=self.multi_precision,
+ name=self.name)
+ else:
+ opt = optim.SGD(learning_rate=self.learning_rate,
+ parameters=parameters,
+ weight_decay=self.weight_decay,
+ grad_clip=self.grad_clip,
+ name=self.name)
return opt
@@ -242,8 +253,9 @@ class AdamW(object):
if self.one_dim_param_no_weight_decay:
self.no_weight_decay_param_name_list += [
- p.name for model in model_list
- for n, p in model.named_parameters() if len(p.shape) == 1
+ p.name
+ for model in model_list for n, p in model.named_parameters()
+ if len(p.shape) == 1
] if model_list else []
opt = optim.AdamW(
diff --git a/test_tipc/config/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5_train_amp_infer_python.txt b/test_tipc/config/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
similarity index 81%
rename from test_tipc/config/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5_train_amp_infer_python.txt
rename to test_tipc/config/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
index 2420e06e03fa4abe66e678a7a06940a391a590a9..67a3efa8cdc1b41b478497fb59e9bd70c8795c2a 100644
--- a/test_tipc/config/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5_train_amp_infer_python.txt
+++ b/test_tipc/config/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:amp_train
-amp_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 AMP.scale_loss=128 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
+amp_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 AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
-===========================eval_params===========================
-eval:tools/eval.py -c ppcls/configs/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5.yaml
+===========================eval_params===========================
+eval:tools/eval.py -c ppcls/configs/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null
##
===========================infer_params==========================
@@ -39,14 +39,14 @@ infer_export:True
infer_quant:Fasle
inference:python/predict_rec.py -c configs/inference_rec.yaml
-o Global.use_gpu:True|False
--o Global.enable_mkldnn:True|False
--o Global.cpu_num_threads:1|6
--o Global.batch_size:1|16
--o Global.use_tensorrt:True|False
--o Global.use_fp16:True|False
+-o Global.enable_mkldnn:False
+-o Global.cpu_num_threads:6
+-o Global.batch_size:1
+-o Global.use_tensorrt:False
+-o Global.use_fp16:False
-o Global.rec_inference_model_dir:../inference
-o Global.infer_imgs:../dataset/Aliproduct/demo_test/
-o Global.save_log_path:null
--o Global.benchmark:True
+-o Global.benchmark:False
null:null
null:null
diff --git a/test_tipc/config/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5_train_ptq_infer_python.txt b/test_tipc/config/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5_train_ptq_infer_python.txt
new file mode 100644
index 0000000000000000000000000000000000000000..d5863d8c06a2647b2c52bee77fac02368023f52c
--- /dev/null
+++ b/test_tipc/config/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5_train_ptq_infer_python.txt
@@ -0,0 +1,54 @@
+===========================train_params===========================
+model_name:GeneralRecognition_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=100
+-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/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
+fpgm_train:null
+distill_train:null
+null:null
+null:null
+##
+===========================eval_params===========================
+eval:tools/eval.py -c ppcls/configs/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5.yaml
+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/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5.yaml
+fpgm_export:null
+distill_export:null
+kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5.yaml -o Global.save_inference_dir=./general_PPLCNet_x2_5_lite_v1.0_infer
+export2:null
+pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/rec/models/inference/general_PPLCNet_x2_5_lite_v1.0_infer.tar
+infer_model:./general_PPLCNet_x2_5_lite_v1.0_infer/
+infer_export:True
+infer_quant:Fasle
+inference:python/predict_rec.py -c configs/inference_rec.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.rec_inference_model_dir:../inference
+-o Global.infer_imgs:../dataset/Aliproduct/demo_test/
+-o Global.save_log_path:null
+-o Global.benchmark:False
+null:null
+null:null
+===========================infer_benchmark_params==========================
+random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
diff --git a/test_tipc/config/MobileNetV3/MobileNetV3_large_x1_0_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt b/test_tipc/config/MobileNetV3/MobileNetV3_large_x1_0_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
index f251e9c9f850e58932f7dbb90b76a52c0eb7782f..8c9d51d2272c9ad3db83493296c4f55fbe776052 100644
--- a/test_tipc/config/MobileNetV3/MobileNetV3_large_x1_0_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
+++ b/test_tipc/config/MobileNetV3/MobileNetV3_large_x1_0_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
@@ -3,7 +3,7 @@ model_name:MobileNetV3_large_x1_0
python:python3.7
gpu_list:0|0,1
-o Global.device:gpu
--o Global.auto_cast:amp
+-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
@@ -12,16 +12,16 @@ train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
-trainer:norm_train|pact_train|fpgm_train
-norm_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
-pact_train:tools/train.py -c ppcls/configs/slim/MobileNetV3_large_x1_0_quantization.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
-fpgm_train:tools/train.py -c ppcls/configs/slim/MobileNetV3_large_x1_0_prune.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
+trainer:amp_train
+amp_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 AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
+pact_train:null
+fpgm_train:null
distill_train:null
null:null
null:null
##
-===========================eval_params===========================
-eval:tools/eval.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml
+===========================eval_params===========================
+eval:tools/eval.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null
##
===========================infer_params==========================
@@ -33,20 +33,20 @@ fpgm_export:tools/export_model.py -c ppcls/configs/slim/MobileNetV3_large_x1_0_p
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml -o Global.save_inference_dir=./inference
export2:null
-inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/whole_chain/MobileNetV3_large_x1_0_inference.tar
+pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/MobileNetV3_large_x1_0_pretrained.pdparams
infer_model:../inference/
-infer_export:null
+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:True|False
--o Global.cpu_num_threads:1|6
--o Global.batch_size:1|16
--o Global.use_tensorrt:True|False
--o Global.use_fp16:True|False
+-o Global.enable_mkldnn:False
+-o Global.cpu_num_threads:6
+-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
+-o Global.benchmark:False
null:null
null:null
diff --git a/test_tipc/config/MobileNetV3/MobileNetV3_large_x1_0_train_ptq_infer_python.txt b/test_tipc/config/MobileNetV3/MobileNetV3_large_x1_0_train_ptq_infer_python.txt
new file mode 100644
index 0000000000000000000000000000000000000000..53628ef5f0bdf54af9feafe58abbe8563330324b
--- /dev/null
+++ b/test_tipc/config/MobileNetV3/MobileNetV3_large_x1_0_train_ptq_infer_python.txt
@@ -0,0 +1,60 @@
+===========================train_params===========================
+model_name:MobileNetV3_large_x1_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/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
+pact_train:tools/train.py -c ppcls/configs/slim/MobileNetV3_large_x1_0_quantization.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
+fpgm_train:tools/train.py -c ppcls/configs/slim/MobileNetV3_large_x1_0_prune.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
+distill_train:null
+to_static_train:-o Global.to_static=True
+null:null
+##
+===========================eval_params===========================
+eval:tools/eval.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_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/MobileNetV3/MobileNetV3_large_x1_0.yaml
+quant_export:tools/export_model.py -c ppcls/configs/slim/MobileNetV3_large_x1_0_quantization.yaml
+fpgm_export:tools/export_model.py -c ppcls/configs/slim/MobileNetV3_large_x1_0_prune.yaml
+distill_export:null
+kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml -o Global.save_inference_dir=./MobileNetV3_large_x1_0_infer
+export2:null
+pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileNetV3_large_x1_0_infer.tar
+infer_model:./MobileNetV3_large_x1_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
+null:null
+===========================train_benchmark_params==========================
+batch_size:256|640
+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
diff --git a/test_tipc/config/PPHGNet/PPHGNet_small_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt b/test_tipc/config/PPHGNet/PPHGNet_small_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
new file mode 100644
index 0000000000000000000000000000000000000000..ce878690bb6844d57c20546a3dda9f9a548e94d1
--- /dev/null
+++ b/test_tipc/config/PPHGNet/PPHGNet_small_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
@@ -0,0 +1,51 @@
+===========================train_params===========================
+model_name:PPHGNet_small
+python:python3.7
+gpu_list:0|0,1
+-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:amp_train
+amp_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 AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
+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_small.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
+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_small.yaml
+quant_export:null
+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_small_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:6
+-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:False
+null:null
diff --git a/test_tipc/config/PPHGNet/PPHGNet_small_train_ptq_infer_python.txt b/test_tipc/config/PPHGNet/PPHGNet_small_train_ptq_infer_python.txt
new file mode 100644
index 0000000000000000000000000000000000000000..ba76846bbb3439c4ce879e32d2fef59d571d99da
--- /dev/null
+++ b/test_tipc/config/PPHGNet/PPHGNet_small_train_ptq_infer_python.txt
@@ -0,0 +1,53 @@
+===========================train_params===========================
+model_name:PPHGNet_small
+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_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
+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_small.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_small.yaml
+quant_export:null
+fpgm_export:null
+distill_export:null
+kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_small.yaml -o Global.save_inference_dir=./PPHGNet_small_infer
+export2:null
+pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPHGNet_small_infer.tar
+infer_model:./PPHGNet_small_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]}]
diff --git a/test_tipc/config/PPHGNet/PPHGNet_tiny_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt b/test_tipc/config/PPHGNet/PPHGNet_tiny_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
new file mode 100644
index 0000000000000000000000000000000000000000..b3c806e76d6747a27b6e84c46854c734375de8ed
--- /dev/null
+++ b/test_tipc/config/PPHGNet/PPHGNet_tiny_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
@@ -0,0 +1,51 @@
+===========================train_params===========================
+model_name:PPHGNet_tiny
+python:python3.7
+gpu_list:0|0,1
+-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:amp_train
+amp_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 AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
+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 -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
+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: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 Global.use_gpu:True|False
+-o Global.enable_mkldnn:False
+-o Global.cpu_num_threads:6
+-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:False
+null:null
diff --git a/test_tipc/config/PPLCNet/PPLCNet_x0_25_train_amp_infer_python.txt b/test_tipc/config/PPLCNet/PPLCNet_x0_25_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
similarity index 79%
rename from test_tipc/config/PPLCNet/PPLCNet_x0_25_train_amp_infer_python.txt
rename to test_tipc/config/PPLCNet/PPLCNet_x0_25_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
index 1977e30f5f91e1a39b805e205279d59e8e81e570..27e84a550367c2a69f9ecbf22d8c7d70e37b733c 100644
--- a/test_tipc/config/PPLCNet/PPLCNet_x0_25_train_amp_infer_python.txt
+++ b/test_tipc/config/PPLCNet/PPLCNet_x0_25_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:amp_train
-amp_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 AMP.scale_loss=128 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
+amp_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 AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
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
+===========================eval_params===========================
+eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_25.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null
##
===========================infer_params==========================
@@ -39,13 +39,13 @@ 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:True|False
--o Global.cpu_num_threads:1|6
--o Global.batch_size:1|16
--o Global.use_tensorrt:True|False
--o Global.use_fp16:True|False
+-o Global.enable_mkldnn:False
+-o Global.cpu_num_threads:6
+-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
+-o Global.benchmark:False
null:null
diff --git a/test_tipc/config/PPLCNet/PPLCNet_x0_35_train_amp_infer_python.txt b/test_tipc/config/PPLCNet/PPLCNet_x0_35_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
similarity index 79%
rename from test_tipc/config/PPLCNet/PPLCNet_x0_35_train_amp_infer_python.txt
rename to test_tipc/config/PPLCNet/PPLCNet_x0_35_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
index ad2ceb210308db6679d0904bb3ed1c7c494839af..6526e3b1f6f193b5f9e411a0afb0efc372999c33 100644
--- a/test_tipc/config/PPLCNet/PPLCNet_x0_35_train_amp_infer_python.txt
+++ b/test_tipc/config/PPLCNet/PPLCNet_x0_35_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:amp_train
-amp_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 AMP.scale_loss=128 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
+amp_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 AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
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
+===========================eval_params===========================
+eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_35.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null
##
===========================infer_params==========================
@@ -39,13 +39,13 @@ 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:True|False
--o Global.cpu_num_threads:1|6
--o Global.batch_size:1|16
--o Global.use_tensorrt:True|False
--o Global.use_fp16:True|False
+-o Global.enable_mkldnn:False
+-o Global.cpu_num_threads:6
+-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
+-o Global.benchmark:False
null:null
diff --git a/test_tipc/config/PPLCNet/PPLCNet_x0_5_train_amp_infer_python.txt b/test_tipc/config/PPLCNet/PPLCNet_x0_5_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
similarity index 79%
rename from test_tipc/config/PPLCNet/PPLCNet_x0_5_train_amp_infer_python.txt
rename to test_tipc/config/PPLCNet/PPLCNet_x0_5_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
index 6f5318b8a965543cc88b4864b9e486250b1d6999..e034c93eac7a7b02fc04a4c53bca47a358d2e3c6 100644
--- a/test_tipc/config/PPLCNet/PPLCNet_x0_5_train_amp_infer_python.txt
+++ b/test_tipc/config/PPLCNet/PPLCNet_x0_5_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:amp_train
-amp_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 AMP.scale_loss=128 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
+amp_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 AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
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
+===========================eval_params===========================
+eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_5.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null
##
===========================infer_params==========================
@@ -39,13 +39,13 @@ 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:True|False
--o Global.cpu_num_threads:1|6
--o Global.batch_size:1|16
--o Global.use_tensorrt:True|False
--o Global.use_fp16:True|False
+-o Global.enable_mkldnn:False
+-o Global.cpu_num_threads:6
+-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
+-o Global.benchmark:False
null:null
diff --git a/test_tipc/config/PPLCNet/PPLCNet_x0_75_train_amp_infer_python.txt b/test_tipc/config/PPLCNet/PPLCNet_x0_75_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
similarity index 79%
rename from test_tipc/config/PPLCNet/PPLCNet_x0_75_train_amp_infer_python.txt
rename to test_tipc/config/PPLCNet/PPLCNet_x0_75_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
index cfda57015d918b79bc3ab9103314b53803544c39..dfbd72ce76e4cbb0690fb77a7004fea08241cc77 100644
--- a/test_tipc/config/PPLCNet/PPLCNet_x0_75_train_amp_infer_python.txt
+++ b/test_tipc/config/PPLCNet/PPLCNet_x0_75_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:amp_train
-amp_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 AMP.scale_loss=128 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
+amp_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 AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
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
+===========================eval_params===========================
+eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_75.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null
##
===========================infer_params==========================
@@ -39,13 +39,13 @@ 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:True|False
--o Global.cpu_num_threads:1|6
--o Global.batch_size:1|16
--o Global.use_tensorrt:True|False
--o Global.use_fp16:True|False
+-o Global.enable_mkldnn:False
+-o Global.cpu_num_threads:6
+-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
+-o Global.benchmark:False
null:null
diff --git a/test_tipc/config/PPLCNet/PPLCNet_x1_0_train_amp_infer_python.txt b/test_tipc/config/PPLCNet/PPLCNet_x1_0_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
similarity index 79%
rename from test_tipc/config/PPLCNet/PPLCNet_x1_0_train_amp_infer_python.txt
rename to test_tipc/config/PPLCNet/PPLCNet_x1_0_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
index c335e54284af5eaeeb321960ba2b27b553a04ca4..b3154cc7258f14ead7e880405f1e9cacd31644e6 100644
--- a/test_tipc/config/PPLCNet/PPLCNet_x1_0_train_amp_infer_python.txt
+++ b/test_tipc/config/PPLCNet/PPLCNet_x1_0_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:amp_train
-amp_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 AMP.scale_loss=128 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
+amp_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 AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
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_0.yaml
+===========================eval_params===========================
+eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_0.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null
##
===========================infer_params==========================
@@ -39,13 +39,13 @@ 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:True|False
--o Global.cpu_num_threads:1|6
--o Global.batch_size:1|16
--o Global.use_tensorrt:True|False
--o Global.use_fp16:True|False
+-o Global.enable_mkldnn:False
+-o Global.cpu_num_threads:6
+-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
+-o Global.benchmark:False
null:null
diff --git a/test_tipc/config/PPLCNet/PPLCNet_x1_0_train_ptq_infer_python.txt b/test_tipc/config/PPLCNet/PPLCNet_x1_0_train_ptq_infer_python.txt
new file mode 100644
index 0000000000000000000000000000000000000000..f38e567fea950a4366255848f9f90cc58c6bd687
--- /dev/null
+++ b/test_tipc/config/PPLCNet/PPLCNet_x1_0_train_ptq_infer_python.txt
@@ -0,0 +1,53 @@
+===========================train_params===========================
+model_name:PPLCNet_x1_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_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
+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_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_x1_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_x1_0.yaml -o Global.save_inference_dir=./PPLCNet_x1_0_infer
+export2:null
+pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPLCNet_x1_0_infer.tar
+infer_model:./PPLCNet_x1_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
diff --git a/test_tipc/config/PPLCNet/PPLCNet_x1_5_train_amp_infer_python.txt b/test_tipc/config/PPLCNet/PPLCNet_x1_5_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
similarity index 79%
rename from test_tipc/config/PPLCNet/PPLCNet_x1_5_train_amp_infer_python.txt
rename to test_tipc/config/PPLCNet/PPLCNet_x1_5_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
index 6e170df68bd3d238e773744851795d62b09283f2..f9df7ba76182d8fd8a146023632f7bef3b9b7763 100644
--- a/test_tipc/config/PPLCNet/PPLCNet_x1_5_train_amp_infer_python.txt
+++ b/test_tipc/config/PPLCNet/PPLCNet_x1_5_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:amp_train
-amp_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 AMP.scale_loss=128 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
+amp_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 AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
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
+===========================eval_params===========================
+eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_5.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null
##
===========================infer_params==========================
@@ -39,13 +39,13 @@ 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:True|False
--o Global.cpu_num_threads:1|6
--o Global.batch_size:1|16
--o Global.use_tensorrt:True|False
--o Global.use_fp16:True|False
+-o Global.enable_mkldnn:False
+-o Global.cpu_num_threads:6
+-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
+-o Global.benchmark:False
null:null
diff --git a/test_tipc/config/PPLCNet/PPLCNet_x2_0_train_amp_infer_python.txt b/test_tipc/config/PPLCNet/PPLCNet_x2_0_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
similarity index 79%
rename from test_tipc/config/PPLCNet/PPLCNet_x2_0_train_amp_infer_python.txt
rename to test_tipc/config/PPLCNet/PPLCNet_x2_0_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
index b3a6f7b57ff8e40e68ee42a4ae6487a56096c0f9..0bb50f5b6d4ef2a13aac54b99dc15822afd0435c 100644
--- a/test_tipc/config/PPLCNet/PPLCNet_x2_0_train_amp_infer_python.txt
+++ b/test_tipc/config/PPLCNet/PPLCNet_x2_0_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:amp_train
-amp_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 AMP.scale_loss=128 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
+amp_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 AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
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
+===========================eval_params===========================
+eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_0.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null
##
===========================infer_params==========================
@@ -39,13 +39,13 @@ 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:True|False
--o Global.cpu_num_threads:1|6
--o Global.batch_size:1|16
--o Global.use_tensorrt:True|False
--o Global.use_fp16:True|False
+-o Global.enable_mkldnn:False
+-o Global.cpu_num_threads:6
+-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
+-o Global.benchmark:False
null:null
diff --git a/test_tipc/config/PPLCNet/PPLCNet_x2_5_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt b/test_tipc/config/PPLCNet/PPLCNet_x2_5_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
index 74c6d046f9d9ff118b83826037b46ba2fb9fadf3..a9b8c2dc6f1ebf5b01aa0f137b251437cf8f9d09 100644
--- a/test_tipc/config/PPLCNet/PPLCNet_x2_5_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
+++ b/test_tipc/config/PPLCNet/PPLCNet_x2_5_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
@@ -3,7 +3,7 @@ model_name:PPLCNet_x2_5
python:python3.7
gpu_list:0|0,1
-o Global.device:gpu
--o Global.auto_cast:amp
+-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
@@ -12,16 +12,16 @@ 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
+trainer:amp_train
+amp_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 AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
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
+===========================eval_params===========================
+eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_5.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null
##
===========================infer_params==========================
@@ -39,13 +39,13 @@ 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:True|False
--o Global.cpu_num_threads:1|6
--o Global.batch_size:1|16
--o Global.use_tensorrt:True|False
--o Global.use_fp16:True|False
+-o Global.enable_mkldnn:False
+-o Global.cpu_num_threads:6
+-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
+-o Global.benchmark:False
null:null
diff --git a/test_tipc/config/PPLCNetV2/PPLCNetV2_base_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt b/test_tipc/config/PPLCNetV2/PPLCNetV2_base_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
new file mode 100644
index 0000000000000000000000000000000000000000..760a470ae03850ad755d479c2fb6dc6f3c9704da
--- /dev/null
+++ b/test_tipc/config/PPLCNetV2/PPLCNetV2_base_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
@@ -0,0 +1,51 @@
+===========================train_params===========================
+model_name:PPLCNetV2_base
+python:python3.7
+gpu_list:0|0,1
+-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:null
+-o Global.pretrained_model:null
+train_model_name:latest
+train_infer_img_dir:./dataset/ILSVRC2012/val
+null:null
+##
+trainer:amp_train
+amp_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 AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
+pact_train:null
+fpgm_train:null
+distill_train:null
+null:null
+null:null
+##
+===========================eval_params===========================
+eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNetV2/PPLCNetV2_base.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
+null:null
+##
+===========================infer_params==========================
+-o Global.save_inference_dir:./inference
+-o Global.pretrained_model:
+norm_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNetV2/PPLCNetV2_base.yaml
+quant_export:null
+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/PPLCNetV2_base_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:6
+-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:False
+null:null
diff --git a/test_tipc/config/PPLCNetV2/PPLCNetV2_base_train_ptq_infer_python.txt b/test_tipc/config/PPLCNetV2/PPLCNetV2_base_train_ptq_infer_python.txt
new file mode 100644
index 0000000000000000000000000000000000000000..d77d1ccc1f15e98c45070e868c3bc546fd18521e
--- /dev/null
+++ b/test_tipc/config/PPLCNetV2/PPLCNetV2_base_train_ptq_infer_python.txt
@@ -0,0 +1,53 @@
+===========================train_params===========================
+model_name:PPLCNetV2_base
+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.first_bs: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/PPLCNetV2/PPLCNetV2_base.yaml -o Global.seed=1234 -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/PPLCNetV2/PPLCNetV2_base.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/PPLCNetV2/PPLCNetV2_base.yaml
+quant_export:null
+fpgm_export:null
+distill_export:null
+kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/PPLCNetV2/PPLCNetV2_base.yaml -o Global.save_inference_dir=./PPLCNetV2_base_infer
+export2:null
+pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPLCNetV2_base_infer.tar
+infer_model:./PPLCNetV2_base_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]}]
diff --git a/test_tipc/config/ResNet/ResNet50_train_purefp16_infer_python.txt b/test_tipc/config/ResNet/ResNet50_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
similarity index 75%
rename from test_tipc/config/ResNet/ResNet50_train_purefp16_infer_python.txt
rename to test_tipc/config/ResNet/ResNet50_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
index 907d579ecc01740922e3c5e06b5087063685224e..77c07a8be0d3fed6e763aeeaaa81edf4d0dc9c37 100644
--- a/test_tipc/config/ResNet/ResNet50_train_purefp16_infer_python.txt
+++ b/test_tipc/config/ResNet/ResNet50_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:amp_train
-amp_train:tools/train.py -c ppcls/configs/ImageNet/ResNet/ResNet50_amp_O1.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 AMP.scale_loss=128 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
+amp_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 AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
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
+===========================eval_params===========================
+eval:tools/eval.py -c ppcls/configs/ImageNet/ResNet/ResNet50.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null
##
===========================infer_params==========================
@@ -39,15 +39,15 @@ 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:True|False
--o Global.cpu_num_threads:1|6
--o Global.batch_size:1|16
--o Global.use_tensorrt:True|False
--o Global.use_fp16:True|False
+-o Global.enable_mkldnn:False
+-o Global.cpu_num_threads:6
+-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
+-o Global.benchmark:False
null:null
null:null
===========================train_benchmark_params==========================
diff --git a/test_tipc/config/ResNet/ResNet50_vd_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt b/test_tipc/config/ResNet/ResNet50_vd_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
index 22c0f8db8395ad8bea6468cb92a5f28606fd3cac..f34c75b04cc17f5ff654c6b7c35986c4428087b5 100644
--- a/test_tipc/config/ResNet/ResNet50_vd_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
+++ b/test_tipc/config/ResNet/ResNet50_vd_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
@@ -3,7 +3,7 @@ model_name:ResNet50_vd
python:python3.7
gpu_list:0|0,1
-o Global.device:gpu
--o Global.auto_cast:amp
+-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
@@ -12,16 +12,16 @@ train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
-trainer:norm_train|pact_train|fpgm_train
-norm_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
-pact_train:tools/train.py -c ppcls/configs/slim/ResNet50_vd_quantization.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
-fpgm_train:tools/train.py -c ppcls/configs/slim/ResNet50_vd_prune.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
+trainer:amp_train
+amp_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 AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
+pact_train:null
+fpgm_train:null
distill_train:null
null:null
null:null
##
-===========================eval_params===========================
-eval:tools/eval.py -c ppcls/configs/ImageNet/ResNet/ResNet50_vd.yaml
+===========================eval_params===========================
+eval:tools/eval.py -c ppcls/configs/ImageNet/ResNet/ResNet50_vd.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null
##
===========================infer_params==========================
@@ -33,20 +33,20 @@ fpgm_export:tools/export_model.py -c ppcls/configs/slim/ResNet50_vd_prune.yaml
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/ResNet/ResNet50_vd.yaml -o Global.save_inference_dir=./inference
export2:null
-inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/whole_chain/ResNet50_vd_inference.tar
+pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/ResNet50_vd_pretrained.pdparams
infer_model:../inference/
-infer_export:null
+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:True|False
--o Global.cpu_num_threads:1|6
--o Global.batch_size:1|16
--o Global.use_tensorrt:True|False
--o Global.use_fp16:True|False
+-o Global.enable_mkldnn:False
+-o Global.cpu_num_threads:6
+-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
+-o Global.benchmark:False
null:null
null:null
diff --git a/test_tipc/config/ResNet/ResNet50_vd_train_ptq_infer_python.txt b/test_tipc/config/ResNet/ResNet50_vd_train_ptq_infer_python.txt
new file mode 100644
index 0000000000000000000000000000000000000000..6398beceee2a69f9be84eb7999c801a4fac5201a
--- /dev/null
+++ b/test_tipc/config/ResNet/ResNet50_vd_train_ptq_infer_python.txt
@@ -0,0 +1,60 @@
+===========================train_params===========================
+model_name:ResNet50_vd
+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_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
+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_vd.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_vd.yaml
+quant_export:null
+fpgm_export:null
+distill_export:null
+kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/ResNet/ResNet50_vd.yaml -o Global.save_inference_dir=./ResNet50_vd_infer
+export2:null
+pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/ResNet50_vd_infer.tar
+infer_model:./ResNet50_vd_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
diff --git a/test_tipc/config/SwinTransformer/SwinTransformer_tiny_patch4_window7_224_train_amp_infer_python.txt b/test_tipc/config/SwinTransformer/SwinTransformer_tiny_patch4_window7_224_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
similarity index 80%
rename from test_tipc/config/SwinTransformer/SwinTransformer_tiny_patch4_window7_224_train_amp_infer_python.txt
rename to test_tipc/config/SwinTransformer/SwinTransformer_tiny_patch4_window7_224_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
index aabba1e440395287fd4d1711a8020a72ac4f4ece..1e9e859fcfa88b1fa97b2befddecf53d7260b22a 100644
--- a/test_tipc/config/SwinTransformer/SwinTransformer_tiny_patch4_window7_224_train_amp_infer_python.txt
+++ b/test_tipc/config/SwinTransformer/SwinTransformer_tiny_patch4_window7_224_train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:amp_train
-amp_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 AMP.scale_loss=128 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
+amp_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 AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
-===========================eval_params===========================
-eval:tools/eval.py -c ppcls/configs/ImageNet/SwinTransformer/SwinTransformer_tiny_patch4_window7_224.yaml
+===========================eval_params===========================
+eval:tools/eval.py -c ppcls/configs/ImageNet/SwinTransformer/SwinTransformer_tiny_patch4_window7_224.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null
##
===========================infer_params==========================
@@ -39,14 +39,14 @@ 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:True|False
--o Global.cpu_num_threads:1|6
--o Global.batch_size:1|16
--o Global.use_tensorrt:True|False
--o Global.use_fp16:True|False
+-o Global.enable_mkldnn:False
+-o Global.cpu_num_threads:6
+-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
+-o Global.benchmark:False
null:null
null:null
diff --git a/test_tipc/config/SwinTransformer/SwinTransformer_tiny_patch4_window7_224_train_ptq_infer_python.txt b/test_tipc/config/SwinTransformer/SwinTransformer_tiny_patch4_window7_224_train_ptq_infer_python.txt
new file mode 100644
index 0000000000000000000000000000000000000000..c87459d2e4ddac829d92931776cee8c8731f834c
--- /dev/null
+++ b/test_tipc/config/SwinTransformer/SwinTransformer_tiny_patch4_window7_224_train_ptq_infer_python.txt
@@ -0,0 +1,60 @@
+===========================train_params===========================
+model_name:SwinTransformer_tiny_patch4_window7_224
+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/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
+pact_train:null
+fpgm_train:null
+distill_train:null
+null:null
+null:null
+##
+===========================eval_params===========================
+eval:tools/eval.py -c ppcls/configs/ImageNet/SwinTransformer/SwinTransformer_tiny_patch4_window7_224.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/SwinTransformer/SwinTransformer_tiny_patch4_window7_224.yaml
+quant_export:null
+fpgm_export:null
+distill_export:null
+kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/SwinTransformer/SwinTransformer_tiny_patch4_window7_224.yaml -o Global.save_inference_dir=./SwinTransformer_tiny_patch4_window7_224_infer
+export2:null
+pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/SwinTransformer_tiny_patch4_window7_224_infer.tar
+infer_model:./SwinTransformer_tiny_patch4_window7_224_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:64|104
+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
diff --git a/test_tipc/prepare.sh b/test_tipc/prepare.sh
index c66a218453109247211ee2d7a956ddfbc21faec7..b6d855e2ee9b9326f9e63b0b982916450b3f7b6d 100644
--- a/test_tipc/prepare.sh
+++ b/test_tipc/prepare.sh
@@ -148,7 +148,7 @@ model_name=$(func_parser_value "${lines[1]}")
model_url_value=$(func_parser_value "${lines[35]}")
model_url_key=$(func_parser_key "${lines[35]}")
-if [[ $FILENAME == *GeneralRecognition* ]]; then
+if [[ $model_name == *ShiTu* ]]; then
cd dataset
rm -rf Aliproduct
rm -rf train_reg_all_data.txt
@@ -185,20 +185,37 @@ if [[ ${MODE} = "lite_train_lite_infer" ]] || [[ ${MODE} = "lite_train_whole_inf
cd ../../
elif [[ ${MODE} = "whole_infer" ]]; then
# download data
- cd dataset
- rm -rf ILSVRC2012
- wget -nc https://paddle-imagenet-models-name.bj.bcebos.com/data/whole_chain/whole_chain_infer.tar
- tar xf whole_chain_infer.tar
- ln -s whole_chain_infer ILSVRC2012
- cd ILSVRC2012
- mv val.txt val_list.txt
- ln -s val_list.txt train_list.txt
- cd ../../
+ if [[ ${model_name} =~ "GeneralRecognition" ]]; then
+ cd dataset
+ rm -rf Aliproduct
+ rm -rf train_reg_all_data.txt
+ rm -rf demo_train
+ wget -nc https://paddle-imagenet-models-name.bj.bcebos.com/data/whole_chain/tipc_shitu_demo_data.tar --no-check-certificate
+ tar -xf tipc_shitu_demo_data.tar
+ ln -s tipc_shitu_demo_data Aliproduct
+ ln -s tipc_shitu_demo_data/demo_train.txt train_reg_all_data.txt
+ ln -s tipc_shitu_demo_data/demo_train demo_train
+ cd tipc_shitu_demo_data
+ ln -s demo_test.txt val_list.txt
+ cd ../../
+ else
+ cd dataset
+ rm -rf ILSVRC2012
+ wget -nc https://paddle-imagenet-models-name.bj.bcebos.com/data/whole_chain/whole_chain_infer.tar
+ tar xf whole_chain_infer.tar
+ ln -s whole_chain_infer ILSVRC2012
+ cd ILSVRC2012
+ mv val.txt val_list.txt
+ ln -s val_list.txt train_list.txt
+ cd ../../
+ fi
# download inference or pretrained model
eval "wget -nc $model_url_value"
- if [[ $model_url_key == *inference* ]]; then
- rm -rf inference
- tar xf "${model_name}_infer.tar"
+ if [[ ${model_url_value} =~ ".tar" ]]; then
+ tar_name=$(func_get_url_file_name "${model_url_value}")
+ echo $tar_name
+ rm -rf {tar_name}
+ tar xf ${tar_name}
fi
if [[ $model_name == "SwinTransformer_large_patch4_window7_224" || $model_name == "SwinTransformer_large_patch4_window12_384" ]]; then
cmd="mv ${model_name}_22kto1k_pretrained.pdparams ${model_name}_pretrained.pdparams"
diff --git a/test_tipc/test_train_inference_python.sh b/test_tipc/test_train_inference_python.sh
index 8b67dba8bc354f125c84ef90e493ae654e07caaf..ad5b301f1ef5bacdd82cafff35d3d61699b38151 100644
--- a/test_tipc/test_train_inference_python.sh
+++ b/test_tipc/test_train_inference_python.sh
@@ -111,9 +111,6 @@ function func_inference() {
for use_gpu in ${use_gpu_list[*]}; do
if [ ${use_gpu} = "False" ] || [ ${use_gpu} = "cpu" ]; then
for use_mkldnn in ${use_mkldnn_list[*]}; do
- # if [ ${use_mkldnn} = "False" ] && [ ${_flag_quant} = "True" ]; then
- # continue
- # fi
for threads in ${cpu_threads_list[*]}; do
for batch_size in ${batch_size_list[*]}; do
_save_log_path="${_log_path}/infer_cpu_usemkldnn_${use_mkldnn}_threads_${threads}_batchsize_${batch_size}.log"
@@ -137,9 +134,6 @@ function func_inference() {
if [ ${precision} = "True" ] && [ ${use_trt} = "False" ]; then
continue
fi
- # if [[ ${use_trt} = "False" || ${precision} =~ "int8" ]] && [ ${_flag_quant} = "True" ]; then
- # continue
- # fi
for batch_size in ${batch_size_list[*]}; do
_save_log_path="${_log_path}/infer_gpu_usetrt_${use_trt}_precision_${precision}_batchsize_${batch_size}.log"
set_infer_data=$(func_set_params "${image_dir_key}" "${_img_dir}")
@@ -162,50 +156,22 @@ function func_inference() {
done
}
-if [[ ${MODE} = "whole_infer" ]] || [[ ${MODE} = "klquant_whole_infer" ]]; then
- IFS="|"
- infer_export_flag=(${infer_export_flag})
- if [ ${infer_export_flag} != "null" ] && [ ${infer_export_flag} != "False" ]; then
- rm -rf ${infer_model_dir_list/..\//}
- export_cmd="${python} ${norm_export} -o Global.pretrained_model=${model_name}_pretrained -o Global.save_inference_dir=${infer_model_dir_list/..\//}"
- eval $export_cmd
- fi
-fi
if [[ ${MODE} = "whole_infer" ]]; then
- GPUID=$3
- if [ ${#GPUID} -le 0 ]; then
- env=" "
- else
- env="export CUDA_VISIBLE_DEVICES=${GPUID}"
- fi
- # set CUDA_VISIBLE_DEVICES
- eval $env
- export Count=0
- cd deploy
- for infer_model in ${infer_model_dir_list[*]}; do
- #run inference
- is_quant=${infer_quant_flag[Count]}
- echo "is_quant: ${is_quant}"
- func_inference "${python}" "${inference_py}" "${infer_model}" "../${LOG_PATH}" "${infer_img_dir}" ${is_quant}
- Count=$(($Count + 1))
- done
- cd ..
-
-elif [[ ${MODE} = "klquant_whole_infer" ]]; then
# for kl_quant
if [ ${kl_quant_cmd_value} != "null" ] && [ ${kl_quant_cmd_value} != "False" ]; then
echo "kl_quant"
command="${python} ${kl_quant_cmd_value}"
+ echo ${command}
eval $command
last_status=${PIPESTATUS[0]}
status_check $last_status "${command}" "${status_log}" "${model_name}"
- cd inference/quant_post_static_model
+ cd ${infer_model_dir_list}/quant_post_static_model
ln -s __model__ inference.pdmodel
ln -s __params__ inference.pdiparams
cd ../../deploy
is_quant=True
- func_inference "${python}" "${inference_py}" "${infer_model_dir_list}/quant_post_static_model" "../${LOG_PATH}" "${infer_img_dir}" ${is_quant}
+ func_inference "${python}" "${inference_py}" "../${infer_model_dir_list}/quant_post_static_model" "../${LOG_PATH}" "${infer_img_dir}" ${is_quant}
cd ..
fi
else