From 4ec395b6d722320e5eaf0d33cdd9ab7bba47d83f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=AA=E9=A3=9E?= <11094814+hong-fei1997@user.noreply.gitee.com> Date: Thu, 23 Feb 2023 01:58:04 +0000 Subject: [PATCH] =?UTF-8?q?update=20PyTorch/contrib/cv/detection/Retinafac?= =?UTF-8?q?e/test/train=5Ffull=5F8p.sh.=20=E9=80=82=E9=85=8D=E4=B8=BB?= =?UTF-8?q?=E4=BB=93test=20=EF=BC=8Ceval=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E5=BE=84=EF=BC=8C=E5=A2=9E=E5=8A=A0=E7=B2=BE=E5=BA=A6=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 洪飞 <11094814+hong-fei1997@user.noreply.gitee.com> --- .../cv/detection/Retinaface/test/train_full_8p.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/PyTorch/contrib/cv/detection/Retinaface/test/train_full_8p.sh b/PyTorch/contrib/cv/detection/Retinaface/test/train_full_8p.sh index 568da85391..47c714b254 100644 --- a/PyTorch/contrib/cv/detection/Retinaface/test/train_full_8p.sh +++ b/PyTorch/contrib/cv/detection/Retinaface/test/train_full_8p.sh @@ -103,7 +103,7 @@ end_time=$(date +%s) e2e_time=$(( $end_time - $start_time )) weights=`find -name 'Resnet50*' | xargs ls -t | head -1` -python3.7 test_widerface.py -m $weights & +python3.7 evaluation.py --gt ${data_path}/wider_face_split/ > eval_result.txt & wait @@ -111,7 +111,7 @@ wait echo "Finish test_widerface.py" cd widerface_evaluate -python3.7 evaluation.py > eval_result.txt & +python3.7 evaluation.py --gt ${data_path}/wider_face_split/ > eval_result.txt & wait @@ -127,7 +127,7 @@ echo "Final Performance images/sec : $FPS" # 输出训练精度,需要模型审视修改 # ***********************************修改了路径******************************* # 打印,不需要修改 -cat eval_result.txt +cat eval_result.txt >>${test_path_dir}/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log echo "E2E Training Duration sec : $e2e_time" # 性能看护结果汇总 @@ -146,6 +146,7 @@ TrainingTime=`awk 'BEGIN{printf "%.2f\n", '${batch_size}'*1000/'${FPS}'}'` # ********************************************修改了路径***************************** grep Epoch: ${test_path_dir}/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log|grep -v Test|awk -F "Loss" '{print $NF}' | awk -F " " '{print $1}' >> ${test_path_dir}/output/$ASCEND_DEVICE_ID/train_${CaseName}_loss.txt +train_accuracy=`grep Easy ${test_path_dir}/output/$ASCEND_DEVICE_ID/${CaseName}.log | awk '{print $NF}'` # 最后一个迭代loss值,不需要修改 ActualLoss=`awk 'END {print}' ${test_path_dir}/output/$ASCEND_DEVICE_ID/train_${CaseName}_loss.txt` @@ -158,4 +159,6 @@ echo "CaseName = ${CaseName}" >> ${test_path_dir}/output/$ASCEND_DEVICE_ID/${Cas echo "ActualFPS = ${ActualFPS}" >> ${test_path_dir}/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "TrainingTime = ${TrainingTime}" >> ${test_path_dir}/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "ActualLoss = ${ActualLoss}" >> ${test_path_dir}/output/$ASCEND_DEVICE_ID/${CaseName}.log +echo "ActualLoss = ${ActualLoss}" >> ${test_path_dir}/output/$ASCEND_DEVICE_ID/${CaseName}.log +echo "TrainAccuracy = ${train_accuracy}" >> ${test_path_dir}/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "E2ETrainingTime = ${e2e_time}" >> ${test_path_dir}/output/$ASCEND_DEVICE_ID/${CaseName}.log -- Gitee