diff --git a/PyTorch/dev/cv/image_classification/VIT_ID2381_for_PyTorch/test/train_performance_1p.sh b/PyTorch/dev/cv/image_classification/VIT_ID2381_for_PyTorch/test/train_performance_1p.sh index e68d8e19ab2c1b7b71ac8b8e222023146a25abe8..a83c9d3725cd9fd9abc48f4e8aefe76925e85000 100644 --- a/PyTorch/dev/cv/image_classification/VIT_ID2381_for_PyTorch/test/train_performance_1p.sh +++ b/PyTorch/dev/cv/image_classification/VIT_ID2381_for_PyTorch/test/train_performance_1p.sh @@ -142,7 +142,7 @@ e2e_time=$(( $end_time - $start_time )) #结果打印,不需要修改 echo "------------------ Final result ------------------" #输出性能FPS,需要模型审视修改 -FPS=`grep FPS $cur_path/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log|awk -F "FPS:" '{print $2}'|tail -n +2|awk '{sum+=$1} END {print"",sum/NR}'|sed s/[[:space:]]//g` +FPS=`grep FPS $cur_path/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log|awk -F "FPS:" '{print $2}'|tail -n +3|awk '{sum+=$1} END {print"",sum/NR}'|sed s/[[:space:]]//g` #FPS=`awk 'BEGIN{printf "%.2f\n",'${batch_size}'*'${perf}'}'`