From 5a93398d5df59eb477668f4ba71568f8646b01bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B4=8B=E6=B4=8B?= <10527367+yang-yang-zhang123456@user.noreply.gitee.com> Date: Mon, 28 Mar 2022 12:34:49 +0000 Subject: [PATCH 1/5] update TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_performance_1p.sh. --- .../test/train_performance_1p.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_performance_1p.sh b/TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_performance_1p.sh index d8c9df878..f23e11b12 100644 --- a/TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_performance_1p.sh +++ b/TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_performance_1p.sh @@ -113,7 +113,7 @@ batch_size=4 if [ x"${modelarts_flag}" != x ]; then - python3.7 ./train.py --data_path=${data_path}/dataset/MPII--output_path=${output_path} \ + python3.7 ./train.py --data_path=${data_path}/dataset/MPII --output_path=${output_path} \ --epochs=${train_epochs} --batch_size=${batch_size} else python3.7 ./train.py --data_path=${data_path}/dataset/MPII --output_path=${output_path} \ -- Gitee From e4a024b54fa6e7a297cf8e1c4accd1090130b42d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B4=8B=E6=B4=8B?= <10527367+yang-yang-zhang123456@user.noreply.gitee.com> Date: Mon, 28 Mar 2022 13:03:45 +0000 Subject: [PATCH 2/5] update TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_performance_1p.sh. --- .../test/train_performance_1p.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_performance_1p.sh b/TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_performance_1p.sh index f23e11b12..cfd75a71d 100644 --- a/TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_performance_1p.sh +++ b/TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_performance_1p.sh @@ -6,7 +6,9 @@ #########第3行 至 100行,请一定不要、不要、不要修改########## ########################################################## # shell脚本所在路径 -cur_path=`echo $(cd $(dirname $0);pwd)` +run_script_file=$(readlink -f "$0") # 执行脚本绝对路径 +run_script_dir=$(dirname $run_script_file) # 执行脚本所在目录 +cur_path=${run_script_dir} # 判断当前shell是否是performance perf_flag=`echo $0 | grep performance | wc -l` @@ -113,8 +115,10 @@ batch_size=4 if [ x"${modelarts_flag}" != x ]; then - python3.7 ./train.py --data_path=${data_path}/dataset/MPII --output_path=${output_path} \ - --epochs=${train_epochs} --batch_size=${batch_size} + python3.7 ./train.py --data_path=${data_path}/dataset/MPII \ + --labal_path=${data_path}/dataset/MPII/mpii_human_pose_v1_u12_2/mpii_human_pose_v1_u12_1.mat \ + --output_path=${output_path} \ + --epochs=${train_epochs} --batch_size=${batch_size} else python3.7 ./train.py --data_path=${data_path}/dataset/MPII --output_path=${output_path} \ --epochs=${train_epochs} --batch_size=${batch_size} 1>${print_log} 2>&1 -- Gitee From 962f97b584577bec575c12ec98e4bad955e46252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B4=8B=E6=B4=8B?= <10527367+yang-yang-zhang123456@user.noreply.gitee.com> Date: Tue, 29 Mar 2022 02:00:52 +0000 Subject: [PATCH 3/5] update TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_performance_1p.sh. --- .../test/train_performance_1p.sh | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_performance_1p.sh b/TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_performance_1p.sh index cfd75a71d..1601c5b60 100644 --- a/TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_performance_1p.sh +++ b/TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_performance_1p.sh @@ -113,17 +113,25 @@ start_time=$(date +%s) train_epochs=1 batch_size=4 + if [ x"${modelarts_flag}" != x ]; then - python3.7 ./train.py --data_path=${data_path}/dataset/MPII \ - --labal_path=${data_path}/dataset/MPII/mpii_human_pose_v1_u12_2/mpii_human_pose_v1_u12_1.mat \ - --output_path=${output_path} \ - --epochs=${train_epochs} --batch_size=${batch_size} + python3.7 ./train.py --data_path=${data_path}/dataset/MPII \ + --label_path=${data_path}/dataset/MPII/mpii_human_pose_v1_u12_2/mpii_human_pose_v1_u12_1.mat \ + --prob_model_path=${data_path}/data/prob_model/prob_model_params.mat \ + --init_session_path=${data_path}/data/init_session/init \ + --output_path=${output_path} \ + --epochs=${train_epochs} --batch_size=${batch_size} else - python3.7 ./train.py --data_path=${data_path}/dataset/MPII --output_path=${output_path} \ + python3.7 ./train.py --data_path=${data_path}/dataset/MPII \ + --label_path=${data_path}/dataset/MPII/mpii_human_pose_v1_u12_2/mpii_human_pose_v1_u12_1.mat \ + --prob_model_path=${data_path}/data/prob_model/prob_model_params.mat \ + --init_session_path=${data_path}/data/init_session/init \ + --output_path=${output_path} \ --epochs=${train_epochs} --batch_size=${batch_size} 1>${print_log} 2>&1 fi + # 性能相关数据计算 #读取iteration/s数据(ITPS),再计算StepTime = 1/ITPS; FPS=BATCH_SIZE * ITPS @@ -133,7 +141,7 @@ FPS=`awk 'BEGIN{printf "%.2f\n", '${batch_size}'*'${ITPS}'}'` # 精度相关数据计算 -train_accuracy=`grep "Validation PCKh@0.5:" ${print_log} | tail -n 1| awk '{print $4}' | cut -c 10- | awk '{sum+=$1} END {print sum/NR}'` +#train_accuracy=`grep "Validation PCKh@0.5:" ${print_log} | tail -n 1| awk '{print $4}' | cut -c 10- | awk '{sum+=$1} END {print sum/NR}'` # 提取所有loss打印信息 grep "loss=" ${print_log} | awk -F "=" '{print $2}' > ./test/output/${ASCEND_DEVICE_ID}/my_output_loss.txt @@ -178,7 +186,7 @@ echo "Final Performance sec/step : $StepTime" echo "E2E Training Duration sec : $e2e_time" # 输出训练精度 -echo "Final Train Accuracy : ${train_accuracy}" +#echo "Final Train Accuracy : ${train_accuracy}" # 最后一个迭代loss值,不需要修改 ActualLoss=(`awk 'END {print $NF}' $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}_loss.txt`) @@ -192,4 +200,4 @@ echo "CaseName = ${CaseName}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}. echo "ActualFPS = ${FPS}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "TrainingTime = ${StepTime}" >> $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 "E2ETrainingTime = ${e2e_time}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log -- Gitee From 5f0d0c2ac14b5f2538f5d8c99ee2aa52dca8460b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B4=8B=E6=B4=8B?= <10527367+yang-yang-zhang123456@user.noreply.gitee.com> Date: Tue, 29 Mar 2022 02:02:54 +0000 Subject: [PATCH 4/5] update TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_full_1p.sh. --- .../test/train_full_1p.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_full_1p.sh b/TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_full_1p.sh index f1c73727e..03bdd98e7 100644 --- a/TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_full_1p.sh +++ b/TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_full_1p.sh @@ -111,15 +111,25 @@ start_time=$(date +%s) train_epochs=30 batch_size=4 + if [ x"${modelarts_flag}" != x ]; then - python3.7 ./train.py --data_path=${data_path}/dataset/MPII --output_path=${output_path} \ + python3.7 ./train.py --data_path=${data_path}/dataset/MPII \ + --label_path=${data_path}/dataset/MPII/mpii_human_pose_v1_u12_2/mpii_human_pose_v1_u12_1.mat \ + --prob_model_path=${data_path}/data/prob_model/prob_model_params.mat \ + --init_session_path=${data_path}/data/init_session/init \ + --output_path=${output_path} \ --epochs=${train_epochs} --batch_size=${batch_size} else - python3.7 ./train.py --data_path=${data_path}/dataset/MPII --output_path=${output_path} \ + python3.7 ./train.py --data_path=${data_path}/dataset/MPII \ + --label_path=${data_path}/dataset/MPII/mpii_human_pose_v1_u12_2/mpii_human_pose_v1_u12_1.mat \ + --prob_model_path=${data_path}/data/prob_model/prob_model_params.mat \ + --init_session_path=${data_path}/data/init_session/init \ + --output_path=${output_path} \ --epochs=${train_epochs} --batch_size=${batch_size} 1>${print_log} 2>&1 fi + # 性能相关数据计算 #读取iteration/s数据(ITPS),再计算StepTime = 1/ITPS; FPS=BATCH_SIZE * ITPS -- Gitee From ed07f14998accfd546545aa81496fe93ba131e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B4=8B=E6=B4=8B?= <10527367+yang-yang-zhang123456@user.noreply.gitee.com> Date: Tue, 29 Mar 2022 02:28:52 +0000 Subject: [PATCH 5/5] update TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_performance_1p.sh. --- .../test/train_performance_1p.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_performance_1p.sh b/TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_performance_1p.sh index 1601c5b60..35cc4e20e 100644 --- a/TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_performance_1p.sh +++ b/TensorFlow/contrib/cv/LiftingFromTheDeep_ID0891_for_Tensorflow/test/train_performance_1p.sh @@ -6,9 +6,7 @@ #########第3行 至 100行,请一定不要、不要、不要修改########## ########################################################## # shell脚本所在路径 -run_script_file=$(readlink -f "$0") # 执行脚本绝对路径 -run_script_dir=$(dirname $run_script_file) # 执行脚本所在目录 -cur_path=${run_script_dir} +cur_path=`echo $(cd $(dirname $0);pwd)` # 判断当前shell是否是performance perf_flag=`echo $0 | grep performance | wc -l` -- Gitee