diff --git a/test_tipc/configs/det_mv3_db_v2.0/train_benchmark.txt b/test_tipc/configs/det_mv3_db_v2.0/train_benchmark.txt index da0050b7d73b63be132eb68d129fa3c27d16c86d..7942c7cfe2bdbb8ce8956c1dee6f7bf5f3bd27fd 100644 --- a/test_tipc/configs/det_mv3_db_v2.0/train_benchmark.txt +++ b/test_tipc/configs/det_mv3_db_v2.0/train_benchmark.txt @@ -13,7 +13,7 @@ train_infer_img_dir:null null:null ## trainer:norm_train -norm_train:tools/train.py -c configs/det/det_mv3_db.yml --profiler_options="batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile" -o Global.pretrained_model=./pretrain_models/MobileNetV3_large_x0_5_pretrained +norm_train:tools/train.py -c configs/det/det_mv3_db.yml -o Global.pretrained_model=./pretrain_models/MobileNetV3_large_x0_5_pretrained pact_train:null fpgm_train:null distill_train:null diff --git a/test_tipc/test_train_inference_python.sh b/test_tipc/test_train_inference_python.sh index 9bde89d78e0ee78c7b650306047b036488a3eab9..c9ca2d504fe34e1b5f2eae91cdce208d7d0ff150 100644 --- a/test_tipc/test_train_inference_python.sh +++ b/test_tipc/test_train_inference_python.sh @@ -5,6 +5,12 @@ FILENAME=$1 # MODE be one of ['lite_train_lite_infer' 'lite_train_whole_infer' 'whole_train_whole_infer', 'whole_infer', 'klquant_whole_infer'] MODE=$2 +if [ $# -eq 3 ] ; then + extra_train_params=$3 +else + extra_train_params="" +fi + dataline=$(awk 'NR==1, NR==51{print}' $FILENAME) # parser params @@ -330,14 +336,14 @@ 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} ${set_amp_config} " + cmd="${python} ${run_train} ${set_use_gpu} ${set_save_model} ${set_epoch} ${set_pretrain} ${set_autocast} ${set_batchsize} ${set_train_params1} ${set_amp_config} ${extra_train_params}" elif [ ${#ips} -le 26 ];then # train with multi-gpu - cmd="${python} -m paddle.distributed.launch --gpus=${gpu} ${run_train} ${set_use_gpu} ${set_save_model} ${set_epoch} ${set_pretrain} ${set_autocast} ${set_batchsize} ${set_train_params1} ${set_amp_config}" + cmd="${python} -m paddle.distributed.launch --gpus=${gpu} ${run_train} ${set_use_gpu} ${set_save_model} ${set_epoch} ${set_pretrain} ${set_autocast} ${set_batchsize} ${set_train_params1} ${set_amp_config} ${extra_train_params}" else # train with multi-machine - cmd="${python} -m paddle.distributed.launch --ips=${ips} --gpus=${gpu} ${run_train} ${set_use_gpu} ${set_save_model} ${set_pretrain} ${set_epoch} ${set_autocast} ${set_batchsize} ${set_train_params1} ${set_amp_config}" + cmd="${python} -m paddle.distributed.launch --ips=${ips} --gpus=${gpu} ${run_train} ${set_use_gpu} ${set_save_model} ${set_pretrain} ${set_epoch} ${set_autocast} ${set_batchsize} ${set_train_params1} ${set_amp_config} ${extra_train_params}" fi # run train - eval $cmd + echo $cmd status_check $? "${cmd}" "${status_log}" set_eval_pretrain=$(func_set_params "${pretrain_model_key}" "${save_log}/${train_model_name}")