From c66b4e88eca1f633581b2a6db147d9b44b2193cf Mon Sep 17 00:00:00 2001 From: acasia Date: Wed, 16 Oct 2024 11:56:11 +0900 Subject: [PATCH] add mkdir txt_logs --- main.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.sh b/main.sh index 85172a3..8d693cd 100644 --- a/main.sh +++ b/main.sh @@ -11,6 +11,7 @@ export USER_PWD export IMAGENET_PATH export OUPUT_DIR="./output" +export LOG_DIR="./txt_logs" python3 compress.py --NetsPresso-Email ${USER_NAME} \ --NetsPresso-Pwd ${USER_PWD} \ @@ -25,6 +26,8 @@ if [ $? -ne 0 ]; then exit 1 fi +mkdir -p ${LOG_DIR} + CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7\ python3 -m torch.distributed.launch --nproc_per_node 8 --master_addr="127.0.0.1" --master_port=12345 \ train.py --model "${OUPUT_DIR}/compressed/compressed.pt" \ @@ -32,7 +35,7 @@ CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7\ --epochs 20 \ --output_dir ${OUPUT_DIR} \ --data-path ${IMAGENET_PATH}\ - > ./txt_logs/training_test.txt 2>&1 & + > ${LOG_DIR}/training_test.txt 2>&1 & # Check if train.py ran successfully if [ $? -ne 0 ]; then