format code style
parent
ac1c206d4a
commit
595a6c5bcf
|
@ -132,7 +132,7 @@ func_sed_params "$FILENAME" "${line_pact_train}" "null"
|
||||||
func_sed_params "$FILENAME" "${line_fgpm_train}" "null"
|
func_sed_params "$FILENAME" "${line_fgpm_train}" "null"
|
||||||
|
|
||||||
# if params
|
# if params
|
||||||
if [ ! -n "$PARAMS" ] ;then
|
if [[ ! -n "$PARAMS" ]];then
|
||||||
# PARAMS input is not a word.
|
# PARAMS input is not a word.
|
||||||
IFS="|"
|
IFS="|"
|
||||||
batch_size_list=(${batch_size})
|
batch_size_list=(${batch_size})
|
||||||
|
@ -151,7 +151,7 @@ else
|
||||||
device_num=${params_list[4]}
|
device_num=${params_list[4]}
|
||||||
IFS=";"
|
IFS=";"
|
||||||
|
|
||||||
if [ ${precision} = "null" ];then
|
if [[ ${precision} = "null" ]];then
|
||||||
precision="fp32"
|
precision="fp32"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ fi
|
||||||
# for log name
|
# for log name
|
||||||
to_static=""
|
to_static=""
|
||||||
# parse "to_static" options and modify trainer into "to_static_trainer"
|
# parse "to_static" options and modify trainer into "to_static_trainer"
|
||||||
if [ $model_type = "dynamicTostatic" ] ;then
|
if [[ ${model_type} = "dynamicTostatic" ]];then
|
||||||
to_static="d2sT_"
|
to_static="d2sT_"
|
||||||
sed -i 's/trainer:norm_train/trainer:to_static_train/g' $FILENAME
|
sed -i 's/trainer:norm_train/trainer:to_static_train/g' $FILENAME
|
||||||
fi
|
fi
|
||||||
|
@ -185,7 +185,7 @@ for batch_size in ${batch_size_list[*]}; do
|
||||||
# So the copy number for train_list is as follows:
|
# So the copy number for train_list is as follows:
|
||||||
total_batch_size=`echo $[$batch_size*${device_num:1:1}*${device_num:3:3}]`
|
total_batch_size=`echo $[$batch_size*${device_num:1:1}*${device_num:3:3}]`
|
||||||
copy_num=`echo $[$total_batch_size/200]`
|
copy_num=`echo $[$total_batch_size/200]`
|
||||||
if [ $copy_num -gt 1 ];then
|
if [[ $copy_num -gt 1 ]];then
|
||||||
cd dataset/ILSVRC2012
|
cd dataset/ILSVRC2012
|
||||||
rm -rf train_list.txt
|
rm -rf train_list.txt
|
||||||
for ((i=1; i <=$copy_num; i++));do
|
for ((i=1; i <=$copy_num; i++));do
|
||||||
|
@ -195,7 +195,7 @@ for batch_size in ${batch_size_list[*]}; do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ ${#gpu_id} -le 1 ];then
|
if [[ ${#gpu_id} -le 1 ]];then
|
||||||
log_path="$SAVE_LOG/profiling_log"
|
log_path="$SAVE_LOG/profiling_log"
|
||||||
mkdir -p $log_path
|
mkdir -p $log_path
|
||||||
log_name="${repo_name}_${model_name}_bs${batch_size}_${precision}_${run_mode}_${device_num}_${to_static}profiling"
|
log_name="${repo_name}_${model_name}_bs${batch_size}_${precision}_${run_mode}_${device_num}_${to_static}profiling"
|
||||||
|
|
Loading…
Reference in New Issue