From 6fce052feba0af3d5395b23aa037876c10e30e8c Mon Sep 17 00:00:00 2001 From: hxxhl88 <736544296@qq.com> Date: Tue, 29 Mar 2022 20:44:53 +0800 Subject: [PATCH] modify for 50 step --- .../test/train_full_1p.sh | 4 ++-- .../test/train_performance_1p.sh | 6 +++--- .../test/train_performance_bs128_1p.sh | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/TensorFlow/built-in/audio/Tacotron2-v1-Encoder_ID1997_for_TensorFlow/test/train_full_1p.sh b/TensorFlow/built-in/audio/Tacotron2-v1-Encoder_ID1997_for_TensorFlow/test/train_full_1p.sh index 1112f2e8e..ea29b44b1 100644 --- a/TensorFlow/built-in/audio/Tacotron2-v1-Encoder_ID1997_for_TensorFlow/test/train_full_1p.sh +++ b/TensorFlow/built-in/audio/Tacotron2-v1-Encoder_ID1997_for_TensorFlow/test/train_full_1p.sh @@ -160,8 +160,8 @@ e2e_time=$(( $end_time - $start_time )) #结果打印,不需要修改 echo "------------------ Final result ------------------" #输出性能FPS,需要模型审视修改 -FPS_tmp=`grep "perf = " $cur_path/output/$ASCEND_DEVICE_ID/train_$ASCEND_DEVICE_ID.log | tail -1 | awk -F "=" '{print $3}' | sed -e 's/^[ ]*//g' | sed -e 's/[ ]*$//g'` -FPS=`awk 'BEGIN {printf "%.2f\n", '${batch_size}'/'${FPS_tmp}'}'` +t_step_time=`grep "perf = " $cur_path/output/$ASCEND_DEVICE_ID/train_$ASCEND_DEVICE_ID.log | tail -50 | awk -F "=" '{print $3}' | awk '{sum+=$1} END {print sum}'` +FPS=`awk 'BEGIN {printf "%.2f\n", '${batch_size}'*'50'/'${t_step_time}'}'` TrainingTime=`awk 'BEGIN {printf "%.2f\n", '1000'*'${batch_size}'/'${FPS}'}'` #打印,不需要修改 diff --git a/TensorFlow/built-in/audio/Tacotron2-v1-Encoder_ID1997_for_TensorFlow/test/train_performance_1p.sh b/TensorFlow/built-in/audio/Tacotron2-v1-Encoder_ID1997_for_TensorFlow/test/train_performance_1p.sh index f9d8fff43..5a9685928 100644 --- a/TensorFlow/built-in/audio/Tacotron2-v1-Encoder_ID1997_for_TensorFlow/test/train_performance_1p.sh +++ b/TensorFlow/built-in/audio/Tacotron2-v1-Encoder_ID1997_for_TensorFlow/test/train_performance_1p.sh @@ -20,7 +20,7 @@ Network="Tacotron2-v1-Encoder_ID1997_for_TensorFlow" #训练epoch train_epochs=2 #训练step -train_steps=100 +train_steps=50 #训练batch_size batch_size=16 #学习率 @@ -162,8 +162,8 @@ e2e_time=$(( $end_time - $start_time )) #结果打印,不需要修改 echo "------------------ Final result ------------------" #输出性能FPS,需要模型审视修改 -FPS_tmp=`grep "perf = " $cur_path/output/$ASCEND_DEVICE_ID/train_$ASCEND_DEVICE_ID.log | tail -1 | awk -F "=" '{print $3}' | sed -e 's/^[ ]*//g' | sed -e 's/[ ]*$//g'` -FPS=`awk 'BEGIN {printf "%.2f\n", '${batch_size}'/'${FPS_tmp}'}'` +t_step_time=`grep "perf = " $cur_path/output/$ASCEND_DEVICE_ID/train_$ASCEND_DEVICE_ID.log | sed '1d' | awk -F "=" '{print $3}' | awk '{sum+=$1} END {print sum}'` +FPS=`awk 'BEGIN {printf "%.2f\n", '${batch_size}'*('${train_steps}'-'1')/'${t_step_time}'}'` TrainingTime=`awk 'BEGIN {printf "%.2f\n", '1000'*'${batch_size}'/'${FPS}'}'` #打印,不需要修改 diff --git a/TensorFlow/built-in/audio/Tacotron2-v1-Encoder_ID1997_for_TensorFlow/test/train_performance_bs128_1p.sh b/TensorFlow/built-in/audio/Tacotron2-v1-Encoder_ID1997_for_TensorFlow/test/train_performance_bs128_1p.sh index 18db79c59..d1cd656a5 100644 --- a/TensorFlow/built-in/audio/Tacotron2-v1-Encoder_ID1997_for_TensorFlow/test/train_performance_bs128_1p.sh +++ b/TensorFlow/built-in/audio/Tacotron2-v1-Encoder_ID1997_for_TensorFlow/test/train_performance_bs128_1p.sh @@ -20,7 +20,7 @@ Network="Tacotron2-v1-Encoder_ID1997_for_TensorFlow" #训练epoch train_epochs=2 #训练step -train_steps=100 +train_steps=50 #训练batch_size batch_size=128 #学习率 @@ -162,8 +162,8 @@ e2e_time=$(( $end_time - $start_time )) #结果打印,不需要修改 echo "------------------ Final result ------------------" #输出性能FPS,需要模型审视修改 -FPS_tmp=`grep "perf = " $cur_path/output/$ASCEND_DEVICE_ID/train_$ASCEND_DEVICE_ID.log | tail -1 | awk -F "=" '{print $3}' | sed -e 's/^[ ]*//g' | sed -e 's/[ ]*$//g'` -FPS=`awk 'BEGIN {printf "%.2f\n", '${batch_size}'/'${FPS_tmp}'}'` +t_step_time=`grep "perf = " $cur_path/output/$ASCEND_DEVICE_ID/train_$ASCEND_DEVICE_ID.log | sed '1d' | awk -F "=" '{print $3}' | awk '{sum+=$1} END {print sum}'` +FPS=`awk 'BEGIN {printf "%.2f\n", '${batch_size}'*('${train_steps}'-'1')/'${t_step_time}'}'` TrainingTime=`awk 'BEGIN {printf "%.2f\n", '1000'*'${batch_size}'/'${FPS}'}'` #打印,不需要修改 -- Gitee