diff --git a/tests/ppdet_params/ppyolo_mbv3_large_coco_params.txt b/tests/ppdet_params/ppyolo_mbv3_large_coco_params.txt index a7aff3675b39620b1ee8f03c0d02a590acb50ea8..fc0bcd7727aa811bf47f895ad0d130abfb39fecf 100644 --- a/tests/ppdet_params/ppyolo_mbv3_large_coco_params.txt +++ b/tests/ppdet_params/ppyolo_mbv3_large_coco_params.txt @@ -3,7 +3,7 @@ model_name:ppyolo_mbv3_large_coco python:python3.7 gpu_list:0 use_gpu:True -auto_cast:null +auto_cast:null|amp epoch:lite_train_infer=1|whole_train_infer=405 save_dir:./output/ TrainReader.batch_size:lite_train_infer=2|whole_train_infer=24 @@ -43,7 +43,7 @@ inference:deploy/python/infer.py --cpu_threads:1|4 --batch_size:1|2 --use_tensorrt:null ---run_mode:fluid +--run_mode:fluid|trt_fp32|trt_fp16|trt_int8 --model_dir: --image_dir:./dataset/coco/val2017/ --save_log_path:null diff --git a/tests/ppdet_params/ppyolo_r50vd_dcn_1x_coco_params.txt b/tests/ppdet_params/ppyolo_r50vd_dcn_1x_coco_params.txt index 38304a84e713132515593035f101d1caef53c878..3e3ab0b043ab12e989d0aa2309ad1f4d933539c1 100644 --- a/tests/ppdet_params/ppyolo_r50vd_dcn_1x_coco_params.txt +++ b/tests/ppdet_params/ppyolo_r50vd_dcn_1x_coco_params.txt @@ -3,7 +3,7 @@ model_name:ppyolo_r50vd_dcn_1x_coco python:python3.7 gpu_list:0 use_gpu:True -auto_cast:null +auto_cast:null|amp epoch:lite_train_infer=1|whole_train_infer=405 save_dir:./output/ TrainReader.batch_size:lite_train_infer=2|whole_train_infer=24 @@ -43,7 +43,7 @@ inference:deploy/python/infer.py --cpu_threads:1|4 --batch_size:1|2 --use_tensorrt:null ---run_mode:fluid +--run_mode:fluid|trt_fp32|trt_fp16|trt_int8 --model_dir: --image_dir:./dataset/coco/val2017/ --save_log_path:null diff --git a/tests/ppdet_params/ppyolov2_r50vd_dcn_365e_coco_params.txt b/tests/ppdet_params/ppyolov2_r50vd_dcn_365e_coco_params.txt index e6d4e4252d5f8cb7cdb678ced949a51de0c8d085..26e7e03cdec08e43f05a297113fb15e399fb770f 100644 --- a/tests/ppdet_params/ppyolov2_r50vd_dcn_365e_coco_params.txt +++ b/tests/ppdet_params/ppyolov2_r50vd_dcn_365e_coco_params.txt @@ -3,7 +3,7 @@ model_name:ppyolov2_r50vd_dcn_365e_coco python:python3.7 gpu_list:0 use_gpu:True -auto_cast:null +auto_cast:null|amp epoch:lite_train_infer=1|whole_train_infer=365 save_dir:./output/ TrainReader.batch_size:lite_train_infer=2|whole_train_infer=12 diff --git a/tests/ppdet_params/yolov3_darknet53_270e_coco_params.txt b/tests/ppdet_params/yolov3_darknet53_270e_coco_params.txt index 25dcd707f07ced28f18dffcc11848b946f6aadf7..42fd225b70c3b42aeba9bbfef5cc36b81f6d9f3f 100644 --- a/tests/ppdet_params/yolov3_darknet53_270e_coco_params.txt +++ b/tests/ppdet_params/yolov3_darknet53_270e_coco_params.txt @@ -3,7 +3,7 @@ model_name:yolov3_darknet53_270e_coco python:python3.7 gpu_list:0 use_gpu:True -auto_cast:null +auto_cast:null|amp epoch:lite_train_infer=1|whole_train_infer=270 save_dir:./output/ TrainReader.batch_size:lite_train_infer=2|whole_train_infer=8 diff --git a/tests/test.sh b/tests/test.sh index c79a900e797452f65739509652ea062ea3b5f0f8..8339d375f4de64e9e2161e23f64d37299931cc60 100644 --- a/tests/test.sh +++ b/tests/test.sh @@ -304,7 +304,11 @@ else continue fi - set_autocast=$(func_set_params "${autocast_key}" "${autocast}") + if [ ${autocast} = "amp" ]; then + set_autocast="--fp16" + else + set_autocast=$(func_set_params "${autocast_key}" "${autocast}") + fi set_epoch=$(func_set_params "${epoch_key}" "${epoch_num}") set_pretrain=$(func_set_params "${pretrain_model_key}" "${pretrain_model_value}") set_batchsize=$(func_set_params "${train_batch_key}" "${train_batch_value}") @@ -319,11 +323,11 @@ else set_save_model=$(func_set_params "${save_model_key}" "${save_log}") if [ ${#gpu} -le 2 ];then # train with cpu or single gpu - cmd="${python} ${run_train} ${set_use_gpu} ${set_save_model} ${set_epoch} ${set_pretrain} ${set_autocast} ${set_batchsize} ${set_train_params1} " + cmd="${python} ${run_train} ${set_use_gpu} ${set_save_model} ${set_epoch} ${set_pretrain} ${set_batchsize} ${set_train_params1} ${set_autocast} " elif [ ${#gpu} -le 15 ];then # train with multi-gpu - cmd="${python} -m paddle.distributed.launch --gpus=${gpu} ${run_train} ${set_save_model} ${set_epoch} ${set_pretrain} ${set_autocast} ${set_batchsize} ${set_train_params1}" + cmd="${python} -m paddle.distributed.launch --gpus=${gpu} ${run_train} ${set_save_model} ${set_epoch} ${set_pretrain} ${set_batchsize} ${set_train_params1} ${set_autocast}" else # train with multi-machine - cmd="${python} -m paddle.distributed.launch --ips=${ips} --gpus=${gpu} ${run_train} ${set_save_model} ${set_pretrain} ${set_epoch} ${set_autocast} ${set_batchsize} ${set_train_params1}" + cmd="${python} -m paddle.distributed.launch --ips=${ips} --gpus=${gpu} ${run_train} ${set_save_model} ${set_pretrain} ${set_epoch} ${set_batchsize} ${set_train_params1} ${set_autocast}" fi # run train eval "unset CUDA_VISIBLE_DEVICES"