Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mkdir txt_logs #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand All @@ -25,14 +26,16 @@ 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" \
--batch-size 256 \
--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
Expand Down