VRIS_vip / LAVT-RIS /scripts /baseline_test_lr_resume_mlw005.sh
dianecy's picture
Upload folder using huggingface_hub
8d82201 verified
#!/bin/bash
#SBATCH --job-name=lavt_mlw005-res
#SBATCH --nodes=1
#SBATCH --gres=gpu:4
#SBATCH --time=0-12:00:00 # d-hh:mm:ss, job time limit
#SBATCH --mem=75000 # cpu memory size
#SBATCH --cpus-per-task=6
#SBATCH --output=./logs/gref_hp05_m10_tmp005_resume.log
source ${HOME}/.bashrc
source ${HOME}/miniconda3/bin/activate base
conda activate cris
cd /home/s1/chaeyunkim/LAVT-RIS
# gref_hp05_m10_tmp005_resume
# --metric_loss_weight 0.05 \
# sbatch ./scripts/baseline_test_lr_resume_mlw005.sh ./models/gref_hp05_m10_tmp005 gref_hp05_m10_tmp005 10 0.05 hardpos_only_refined /home/s1/chaeyunkim/LAVT-RIS/models/gref_hp05_m10_tmp005/model_best_gref_hp05_m10_tmp005.pth
#--metric_loss_weight 0.05 \
# gref_hp05_m10_tmp005_orig_resume
# sbatch ./scripts/baseline_test_lr_resume_mlw005.sh ./models/gref_hp05_m10_tmp005_orig gref_hp05_m10_tmp005_orig 10 0.05 hardpos_only /home/s1/chaeyunkim/LAVT-RIS/models/gref_hp05_m10_tmp005_orig/model_best_gref_hp05_m10_tmp005_orig.pth
export NCCL_P2P_DISABLE=1
export NVIDIA_TF32_OVERRIDE=0
# # core args
# BATCH_SIZE=64
GPUS=4
OUTPUT_DIR=$1
EXP_NAME=$2
MARGIN=$3
TEMP=$4
MODE=$5
RESUME=$6
# # Create the directory if it does not exist
# if [[ ! -d "${OPT_DIR}/${EXP_NAME}" ]]; then
# echo "Directory ${OPT_DIR}/${EXP_NAME} does not exist. Creating it..."
# mkdir -p "${OPT_DIR}/${EXP_NAME}"
# fi
# TRAIN
# hardpos_only, hardpos_only_rev
python_args="--model lavt_one \
--dataset refcocog \
--splitBy umd \
--output-dir ${OUTPUT_DIR} \
--model_id ${EXP_NAME} \
--batch-size 4 \
--lr 0.00005 \
--wd 1e-2 \
--swin_type base \
--pretrained_swin_weights ./pretrained_weights/swin_base_patch4_window12_384_22k.pth \
--epochs 40 \
--img_size 480 \
--metric_learning \
--margin_value ${MARGIN} \
--temperature ${TEMP} \
--resume ${RESUME} \
--metric_mode ${MODE} \
--metric_loss_weight 0.05 \
--exclude_multiobj "
python -m torch.distributed.launch --nproc_per_node=$GPUS train.py $python_args
# python test.py --model lavt_one --swin_type base --dataset refcocog --splitBy umd --split test --resume ./models/gref_umd/lavt_test_lr/gref_testlr_4gpu.pth --workers 4 --ddp_trained_weights --window12 --img_size 480