From ee299a8ee44f1aea07b70ddd9831ce9d0a6df621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=9B=BD=E5=BA=86?= <3224925783@qq.com> Date: Fri, 16 Dec 2022 09:25:36 +0000 Subject: [PATCH 1/2] update TensorFlow/contrib/reinforcement-learning/iqn/IQN_ID1995_for_TensorFlow/IQN_tf.py. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王国庆 <3224925783@qq.com> --- .../iqn/IQN_ID1995_for_TensorFlow/IQN_tf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/TensorFlow/contrib/reinforcement-learning/iqn/IQN_ID1995_for_TensorFlow/IQN_tf.py b/TensorFlow/contrib/reinforcement-learning/iqn/IQN_ID1995_for_TensorFlow/IQN_tf.py index 7f851ebb3..f3e89b74a 100644 --- a/TensorFlow/contrib/reinforcement-learning/iqn/IQN_ID1995_for_TensorFlow/IQN_tf.py +++ b/TensorFlow/contrib/reinforcement-learning/iqn/IQN_ID1995_for_TensorFlow/IQN_tf.py @@ -410,6 +410,7 @@ def train(epsilon, model, restart_step=0): '| Loss: ', loss, '| return: ', mean_100_ep_return, '| Time:', time_interval, + '| FPS:', args.batch_size / (time.time()-start_time) * step, '| max_r:', max(result)) # save model #if step % (SAVE_FREQ * 10) == 0: -- Gitee From 8e5724ac5f740a551f94d195a6ed6389c00271f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=9B=BD=E5=BA=86?= <3224925783@qq.com> Date: Fri, 16 Dec 2022 09:26:35 +0000 Subject: [PATCH 2/2] update IQN_ID1995_for_TensorFlow/test/train_performance_1p.sh. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王国庆 <3224925783@qq.com> --- .../iqn/IQN_ID1995_for_TensorFlow/test/train_performance_1p.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TensorFlow/contrib/reinforcement-learning/iqn/IQN_ID1995_for_TensorFlow/test/train_performance_1p.sh b/TensorFlow/contrib/reinforcement-learning/iqn/IQN_ID1995_for_TensorFlow/test/train_performance_1p.sh index 2e2db234a..9080e3a8f 100644 --- a/TensorFlow/contrib/reinforcement-learning/iqn/IQN_ID1995_for_TensorFlow/test/train_performance_1p.sh +++ b/TensorFlow/contrib/reinforcement-learning/iqn/IQN_ID1995_for_TensorFlow/test/train_performance_1p.sh @@ -137,7 +137,7 @@ e2e_time=$(( $end_time - $start_time )) #结果打印,不需要修改 echo "------------------ Final result ------------------" #输出性能FPS,需要模型审视修改 -FPS=`grep "Time:" $cur_path/test/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log |awk 'END {print}' |awk '{print $14}'` +FPS=`grep "FPS:" $cur_path/test/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log |awk -F 'FPS: ' '{print $2}' |awk -F '|' '{print $1}'|awk 'NR>3'|awk '{sum+=$1} END {print sum/NR}'` #打印,不需要修改 echo "Final Performance images/sec : $FPS" -- Gitee