From 15cac9611abb86e91097c76b6a0955bc529a6280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B4=8B=E6=B4=8B?= <10527367+yang-yang-zhang123456@user.noreply.gitee.com> Date: Tue, 22 Mar 2022 08:46:06 +0000 Subject: [PATCH] update TensorFlow/contrib/cv/MEAN-TEACHER_ID0789_for_TensorFlow/test/train_full_1p.sh. --- .../test/train_full_1p.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/TensorFlow/contrib/cv/MEAN-TEACHER_ID0789_for_TensorFlow/test/train_full_1p.sh b/TensorFlow/contrib/cv/MEAN-TEACHER_ID0789_for_TensorFlow/test/train_full_1p.sh index 59315a880..13c24e67a 100644 --- a/TensorFlow/contrib/cv/MEAN-TEACHER_ID0789_for_TensorFlow/test/train_full_1p.sh +++ b/TensorFlow/contrib/cv/MEAN-TEACHER_ID0789_for_TensorFlow/test/train_full_1p.sh @@ -124,9 +124,12 @@ e2e_time=$(( $end_time - $start_time )) #结果打印,不需要修改 echo "------------------ Final result ------------------" -#输出性能FPS,需要模型审视修改 +#输出TrainingTime,需要模型审视修改 TrainingTime=`grep "Perf: " $cur_path/test/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log |awk 'END {print $11}'` - +#输出FPS +FPS=`awk 'BEGIN{printf "%.2f\n", '${batch_size}'/'${TrainingTime}'}'` +#打印,不需要修改 +echo "Final Performance images/sec : $FPS" #性能看护结果汇总 #训练用例信息,不需要修改 @@ -136,10 +139,12 @@ CaseName=${Network}_bs${BatchSize}_${RANK_SIZE}'p'_'perf' ##获取性能数据,不需要修改 #吞吐量 -ActualFPS=`awk 'BEGIN{printf "%.2f\n", '${batch_size}'/'${TrainingTime}'}'` - +ActualFPS=${FPS} #获取模型精度,该网络为错误率 -train_accuracy=`grep "train/error" $cur_path/test/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log |awk 'END {print $5}'|sed 's/,//g'|sed 's/%//g'` +train_accuracy=`grep "eval/error/ema:" $cur_path/test/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log | awk 'END {print $1}' | tr -d "%,"` +#打印,不需要修改 +echo "Final Train Accuracy : ${train_accuracy}" +echo "Final Training Duration sec : $e2etime" #从train_$ASCEND_DEVICE_ID.log提取Loss到train_${CaseName}_loss.txt中,需要根据模型审视 grep 'train/class_cost' $cur_path/test/output/$ASCEND_DEVICE_ID/train_$ASCEND_DEVICE_ID.log|awk '{print $7}'|sed 's/,//g'|sed 's/%//g' > $cur_path/test/output/$ASCEND_DEVICE_ID/train_${CaseName}_loss.txt -- Gitee