From ba1c6590bcbc2b9ffed684164f359bffa686ac1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=B2=BE=E7=A7=91?= <2351312060@qq.com> Date: Fri, 25 Mar 2022 03:34:00 +0000 Subject: [PATCH] /3D_attentionnet_ID0478_for_PyTorch/test/train_performance_1p.sh. --- .../test/train_performance_1p.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PyTorch/dev/cv/detection/3D_attentionnet_ID0478_for_PyTorch/test/train_performance_1p.sh b/PyTorch/dev/cv/detection/3D_attentionnet_ID0478_for_PyTorch/test/train_performance_1p.sh index ff9f839f51..06a15c8fb4 100644 --- a/PyTorch/dev/cv/detection/3D_attentionnet_ID0478_for_PyTorch/test/train_performance_1p.sh +++ b/PyTorch/dev/cv/detection/3D_attentionnet_ID0478_for_PyTorch/test/train_performance_1p.sh @@ -91,7 +91,7 @@ if [[ $data_path == "" ]];then fi sed -i "s|./data/|${data_path}/|g" ${cur_path}/train.py - +sed -i "s|total_epoch = 1|total_epoch = 3|g" ${cur_path}/train.py cd ${cur_path} #训练开始时间,不需要修改 @@ -133,7 +133,7 @@ sed -i "s|${data_path}/|./data/|g" ${cur_path}/train.py #结果打印,不需要修改 echo "------------------ Final result ------------------" #输出性能FPS,需要模型审视修改 -temp=`grep "takes time:" $cur_path/test/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log | awk -F " " '{print $5}'` +temp=`grep "takes time:" $cur_path/test/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log | awk -F " " 'END {print $5}'` #TrainingTime=`echo "scale=2;${temp} * 1000 / ${train_steps}"|bc` TrainingTime=`python3 -c "print(${temp}*1000/${train_steps})"` FPS=`python3 -c "print(${batch_size}/(${temp}/${train_steps}))"` -- Gitee