From dc0aa1dd9c787929a837ed2ecf61dac93aec2e46 Mon Sep 17 00:00:00 2001 From: hanxiaoxuan Date: Wed, 4 Jan 2023 08:57:24 +0800 Subject: [PATCH] restore change for compile time --- .../recommendation/DIEN_ID3065_for_TensorFlow/script/train.py | 2 +- .../test/train_RT2_performance_1p.sh | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/TensorFlow/built-in/recommendation/DIEN_ID3065_for_TensorFlow/script/train.py b/TensorFlow/built-in/recommendation/DIEN_ID3065_for_TensorFlow/script/train.py index d866126f1..8f99a5799 100644 --- a/TensorFlow/built-in/recommendation/DIEN_ID3065_for_TensorFlow/script/train.py +++ b/TensorFlow/built-in/recommendation/DIEN_ID3065_for_TensorFlow/script/train.py @@ -233,7 +233,7 @@ def train( aux_loss_sum += aux_loss iter += 1 sys.stdout.flush() - if (iter % test_iter) == 0 or iter <= 5: + if (iter % test_iter) == 0: avg_examples_per_second = batch_size/(end_time - start_time) print("avg_examples_per_second: ", avg_examples_per_second) print('iter: %d ----> train_loss: %.4f ---- train_accuracy: %.4f ---- train_aux_loss: %.4f ---- perf: %.4f' % \ diff --git a/TensorFlow/built-in/recommendation/DIEN_ID3065_for_TensorFlow/test/train_RT2_performance_1p.sh b/TensorFlow/built-in/recommendation/DIEN_ID3065_for_TensorFlow/test/train_RT2_performance_1p.sh index b0ad15296..a397bc8f7 100644 --- a/TensorFlow/built-in/recommendation/DIEN_ID3065_for_TensorFlow/test/train_RT2_performance_1p.sh +++ b/TensorFlow/built-in/recommendation/DIEN_ID3065_for_TensorFlow/test/train_RT2_performance_1p.sh @@ -135,9 +135,6 @@ FPS=`grep avg_examples_per_second $cur_path/output/$ASCEND_DEVICE_ID/train_$ASC #打印,不需要修改 echo "Final Performance item/sec : $FPS" -#输出CompileTime -CompileTime=`grep "perf:" $cur_path/output/$ASCEND_DEVICE_ID/train_$ASCEND_DEVICE_ID.log |head -n 1|awk '{print $14}'` - #输出训练精度,需要模型审视修改 train_accuracy=`grep "train_accuracy" $cur_path/output/$ASCEND_DEVICE_ID/train_$ASCEND_DEVICE_ID.log | awk -F "train_accuracy:" 'END{print $2}' | awk -F ' ' '{print $1}'|sed s/[[:space:]]//g` #打印,不需要修改 @@ -173,5 +170,4 @@ echo "TrainAccuracy = ${train_accuracy}" >> $cur_path/output/$ASCEND_DEVICE_ID/$ echo "TrainingTime = ${TrainingTime}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "ActualLoss = ${ActualLoss}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "E2ETrainingTime = ${e2e_time}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log -echo "CompileTime = ${CompileTime}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log -- Gitee