diff --git a/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/set_conda.sh b/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/set_conda.sh new file mode 100644 index 0000000000000000000000000000000000000000..d050d95db597341eb6de14aa803c1502f0cf1b0b --- /dev/null +++ b/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/set_conda.sh @@ -0,0 +1,2 @@ +export PATH=/home/anaconda3/bin:$PATH +export LD_LIBRARY_PATH=/home/anaconda3/lib:$LD_LIBRARY_PATH \ No newline at end of file diff --git a/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/train_full_8p.sh b/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/train_full_8p.sh index cfb2d20015de78c62db9a78098e8ecc94fe9990f..b008126a97d96572b7658e9eaa6c863a3a83159e 100644 --- a/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/train_full_8p.sh +++ b/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/train_full_8p.sh @@ -65,6 +65,12 @@ do elif [[ $para == --epochs* ]];then epochs=`echo ${para#*=}` fi + if [[ $para == --conda_name* ]];then + conda_name=`echo ${para#*=}` + source set_conda.sh --conda_name=$conda_name + source activate $conda_name + echo "PATH TRAIN AFTER :$PATH" + fi done #校验是否传入data_path,不需要修改 @@ -159,4 +165,11 @@ 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 "TrainAccuracy = ${train_accuracy}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log -echo "E2ETrainingTime = ${e2e_time}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log \ No newline at end of file +echo "E2ETrainingTime = ${e2e_time}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log + +#退出conda环境 +conda deactivate +if [-n "$conda_name"];then + echo "conda $conda_name deactivate" + conda deactivate +fi \ No newline at end of file diff --git a/PyTorch/built-in/nlp/Bert-Squad_ID0470_for_PyTorch/test/train_full_8p.sh b/PyTorch/built-in/nlp/Bert-Squad_ID0470_for_PyTorch/test/train_full_8p.sh index d7c67c17572eed069a1b9e8f829f67f91d61d3ca..8ff876b4c0ce28c6a133fca6849d4c1fb7607ec6 100644 --- a/PyTorch/built-in/nlp/Bert-Squad_ID0470_for_PyTorch/test/train_full_8p.sh +++ b/PyTorch/built-in/nlp/Bert-Squad_ID0470_for_PyTorch/test/train_full_8p.sh @@ -121,7 +121,7 @@ do --seed 1 \ --fp16 \ --loss_scale 4096 \ - --vocab_file "data/uncased_L-24_H-1024_A-16/vocab.txt" \ + --vocab_file ${data_path}/data/uncased_L-24_H-1024_A-16/vocab.txt \ --do_eval \ --eval_script ${data_path}/evaluate-v1.1.py \ --npu_id ${ASCEND_DEVICE_ID} \ diff --git a/PyTorch/dev/cv/image_classification/DeepLab-CRF_ID1873_for_PyTorch/test/train_full_1p.sh b/PyTorch/dev/cv/image_classification/DeepLab-CRF_ID1873_for_PyTorch/test/train_full_1p.sh index a71b37404a66f5daf237a77eb3ef57a22e1b54b1..519ac6c41bb0f0324fc0ae0485e8eec9219310f0 100644 --- a/PyTorch/dev/cv/image_classification/DeepLab-CRF_ID1873_for_PyTorch/test/train_full_1p.sh +++ b/PyTorch/dev/cv/image_classification/DeepLab-CRF_ID1873_for_PyTorch/test/train_full_1p.sh @@ -170,7 +170,7 @@ grep "the loss is: " $cur_path/output/$ASCEND_DEVICE_ID/train_$ASCEND_DEVICE_ID. ActualLoss=`awk 'END {print}' $cur_path/output/$ASCEND_DEVICE_ID/train_${CaseName}_loss.txt` #关键信息打印到${CaseName}.log中,不需要修改 -echo "Network = ${Network}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log +echo "Network = ${Network}" > $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "RankSize = ${RANK_SIZE}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "BatchSize = ${BatchSize}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "DeviceType = ${DeviceType}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log