diff --git a/TensorFlow/built-in/cv/detection/SSD-Resnet50V1-FPN_ID1463_for_TensorFlow/models/research/object_detection/model_main_rt.py b/TensorFlow/built-in/cv/detection/SSD-Resnet50V1-FPN_ID1463_for_TensorFlow/models/research/object_detection/model_main_rt.py index aa1dab728bff80d9057b84a42b102e4fd4df88c5..7702d48404b3c78ff63f3e3b26fc9d8f307ffa43 100644 --- a/TensorFlow/built-in/cv/detection/SSD-Resnet50V1-FPN_ID1463_for_TensorFlow/models/research/object_detection/model_main_rt.py +++ b/TensorFlow/built-in/cv/detection/SSD-Resnet50V1-FPN_ID1463_for_TensorFlow/models/research/object_detection/model_main_rt.py @@ -152,7 +152,10 @@ def main(unused_argv): ##################################NPU_modify end################################### eval_hooks = [] for x in range(FLAGS.eval_count): + start = time.time() estimator.train(train_input_fn, hooks=npu_hooks_append(hooks_list=train_hooks), steps=(train_steps // FLAGS.eval_count)) + estimator_time = time.time() - start + print("step/s: {:g}".format(estimator_time)) if (get_npu_rank_id() == 0): eval_input_fn = eval_input_fns[0] #eval阻塞,临时规避 diff --git a/TensorFlow/built-in/cv/detection/SSD-Resnet50V1-FPN_ID1463_for_TensorFlow/test/train_RT2_performance_1p.sh b/TensorFlow/built-in/cv/detection/SSD-Resnet50V1-FPN_ID1463_for_TensorFlow/test/train_RT2_performance_1p.sh index 01abaf5d8d842d18296160cdb4bb88ba3c834ff9..c95fc2a345ff4249504b0fb8cbb461b88605089f 100644 --- a/TensorFlow/built-in/cv/detection/SSD-Resnet50V1-FPN_ID1463_for_TensorFlow/test/train_RT2_performance_1p.sh +++ b/TensorFlow/built-in/cv/detection/SSD-Resnet50V1-FPN_ID1463_for_TensorFlow/test/train_RT2_performance_1p.sh @@ -141,6 +141,9 @@ FPS=`grep -a 'INFO:tensorflow:global_step/sec: ' $cur_path/output/$ASCEND_DEVICE FPS=`awk 'BEGIN{printf "%.2f\n",'${batch_size}'*'${FPS}'}'` echo "Final Performance images/sec : $FPS" + +#输出CompileTime +CompileTime=`grep "step/s" $cur_path/output/$ASCEND_DEVICE_ID/train_$ASCEND_DEVICE_ID.log |awk '{print$2}'` ################################精度结果处理######################### #精度计算,需要根据网络修改 train_accuracy=`grep Precision $cur_path/output/$ASCEND_DEVICE_ID/train_$ASCEND_DEVICE_ID.log|grep Average |awk 'NR==1 {print $13}'` @@ -168,6 +171,7 @@ echo "ActualFPS = ${ActualFPS}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName 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 #eval版本需求开发中,精度结果临时看护最终的loss echo "Final Training Accuracy loss: $ActualLoss"