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/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/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_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_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/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/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