From 35f6b0f9b488a350500b2c8ae3e46420894d3ec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E7=88=B1=E4=B8=9C?= <384169931@qq.com> Date: Fri, 12 May 2023 07:10:15 +0000 Subject: [PATCH] update TensorFlow/built-in/recommendation/DIN_ID0190_for_TensorFlow/test/train_performance_1p.sh. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 苏爱东 <384169931@qq.com> --- .../test/train_performance_1p.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/TensorFlow/built-in/recommendation/DIN_ID0190_for_TensorFlow/test/train_performance_1p.sh b/TensorFlow/built-in/recommendation/DIN_ID0190_for_TensorFlow/test/train_performance_1p.sh index b86b0814f..eee7293b1 100644 --- a/TensorFlow/built-in/recommendation/DIN_ID0190_for_TensorFlow/test/train_performance_1p.sh +++ b/TensorFlow/built-in/recommendation/DIN_ID0190_for_TensorFlow/test/train_performance_1p.sh @@ -87,6 +87,7 @@ fi cd $cur_path/examples sed -i "s|./data|$data_path|g" din_demo.py sed -i "s|epochs=5|epochs=2|g" din_demo.py +sed -i "s|rank_id =|#rank_id =|g" din_demo.py RANK_ID_START=0 @@ -94,10 +95,7 @@ RANK_SIZE=1 for((RANK_ID=$RANK_ID_START;RANK_ID<$((RANK_SIZE+RANK_ID_START));RANK_ID++)); do - echo "Device ID: $RANK_ID" - export RANK_ID=$RANK_ID - export ASCEND_DEVICE_ID=$RANK_ID - ASCEND_DEVICE_ID=$RANK_ID + if [ -d $cur_path/test/output/${ASCEND_DEVICE_ID} ];then rm -rf $cur_path/test/output/${ASCEND_DEVICE_ID} mkdir -p $cur_path/test/output/${ASCEND_DEVICE_ID} @@ -118,7 +116,8 @@ done wait sed -i 's///g' ${test_path_dir}/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log -sed -i 's/ /\n/g' ${test_path_dir}/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log +sed -i 's/ +/\n/g' ${test_path_dir}/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log ##################获取训练数据################ #训练结束时间,不需要修改 end_time=$(date +%s) -- Gitee