From eb414921ea4ac00c2d1b24580e8522201f22a9bb Mon Sep 17 00:00:00 2001 From: 18118216380 <3224925783@qq.com> Date: Tue, 12 Apr 2022 16:46:18 +0800 Subject: [PATCH] 4.12 --- .../test/train_performance_1p.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/PyTorch/built-in/cv/detection/Faster_Mask_RCNN_for_PyTorch/test/train_performance_1p.sh b/PyTorch/built-in/cv/detection/Faster_Mask_RCNN_for_PyTorch/test/train_performance_1p.sh index 701c864ccb..a59b88d97d 100644 --- a/PyTorch/built-in/cv/detection/Faster_Mask_RCNN_for_PyTorch/test/train_performance_1p.sh +++ b/PyTorch/built-in/cv/detection/Faster_Mask_RCNN_for_PyTorch/test/train_performance_1p.sh @@ -11,6 +11,7 @@ RANK_ID_START=0 # 数据集路径,保持为空,不需要修改 data_path="" +test_path_dir="" #设置默认日志级别,不需要修改 export ASCEND_GLOBAL_LOG_LEVEL_ETP=3 @@ -75,6 +76,8 @@ do mkdir -p ${profiling_dump_path} elif [[ $para == --data_path* ]];then data_path=`echo ${para#*=}` + elif [[ $para == --test_path_dir* ]];then + test_path_dir=`echo ${para#*=}` fi done @@ -98,6 +101,15 @@ sed -i "s|\"coco_2017_val\": (\"coco/val2017\", \"coco/annotations/instances_val sed -i "s|WEIGHTS: \"detectron2://ImageNetPretrained/MSRA/R-101.pkl\"|WEIGHTS: \"$data_path/R-101.pkl\"|g" $cur_path/../configs/COCO-InstanceSegmentation/mask_rcnn_R_101_FPN_3x.yaml wait +check_etp_flag=`env | grep etp_running_flag` +etp_flag=`echo ${check_etp_flag#*=}` +echo $etp_flag > ${cur_path}/output/$ASCEND_DEVICE_ID/pp.txt +if [ x"${etp_flag}" == x"true" ];then + sed -i "s|ret.append(hooks.EvalHook(cfg.TEST.EVAL_PERIOD, test_and_save_results))|#ret.append(hooks.EvalHook(cfg.TEST.EVAL_PERIOD, test_and_save_results))|g" $cur_path/../detectron2/engine/defaults.py +else + source ${test_path_dir}/env_npu.sh +fi + cd $cur_path/../ python3 setup.py build develop > $cur_path/../log.txt -- Gitee