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 1112f2e8ecd8d13c8cf8d424f20e46f9bd07a939..ea29b44b15d3a707ccd15f868c97c09180e6d241 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 f9d8fff43a4305d5a9fed1765ec3bf2ff89f6cdb..5a96859282a94b7210c6da0e0a84ceac8d496752 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 18db79c590538759e0ed24f7dad2aa084fed47e2..d1cd656a55de9dd648c15c5e5037348edf9efd04 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}'}'` #打印,不需要修改