diff --git a/benchmark/run_benchmark.sh b/benchmark/run_benchmark.sh index 5987685362..eddc331360 100644 --- a/benchmark/run_benchmark.sh +++ b/benchmark/run_benchmark.sh @@ -10,7 +10,7 @@ function _set_params(){ batch_size=${2:-"2"} fp_item=${3:-"fp32"} # fp32 or fp16 max_iter=${4:-"100"} - model_name=${5:-"model_name"} + model_item=${5:-"model_item"} # fastscnn|segformer_b0| ocrnet_hrnetw48 num_workers=${6:-"3"} run_log_path=${TRAIN_LOG_DIR:-$(pwd)} base_batch_size=${batch_size} @@ -21,11 +21,12 @@ function _set_params(){ keyword="ips:" # 解析日志,筛选出数据所在行的关键字 (必填) keyword_loss="loss:" #选填 index="1" + model_name=${model_item}_bs${batch_size}_${fp_item} # 模型的不同bs、fp配置模型应不一样,避免入库会混乱 device=${CUDA_VISIBLE_DEVICES//,/ } arr=(${device}) num_gpu_devices=${#arr[*]} - log_file=${run_log_path}/${model_name}_${run_mode}_bs${batch_size}_${fp_item}_${num_gpu_devices} + log_file=${run_log_path}/${model_item}_${run_mode}_bs${batch_size}_${fp_item}_${num_gpu_devices} } function _train(){ @@ -35,7 +36,7 @@ function _train(){ if [ $fp_item = "fp16" ]; then use_fp16_cmd="--fp16" fi - train_cmd="--config=benchmark/configs/${model_name}.yml \ + train_cmd="--config=benchmark/configs/${model_item}.yml \ --batch_size=${batch_size} \ --iters=${max_iter} \ --num_workers=${num_workers} ${use_fp16_cmd}"