File size: 938 Bytes
6551065 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
#!/bin/bash
dataset="mimic_cxr"
annotation="./data/mimic_cxr/annnotation.json"
base_dir="./data/mimic_cxr/images"
version="v1_shallow"
savepath="./save/$dataset/$version"
if [ ! -d "$savepath" ]; then
mkdir -p "$savepath"
echo "Folder '$savepath' created."
else
echo "Folder '$savepath' already exists."
fi
python -u train.py \
--dataset ${dataset} \
--annotation ${annotation} \
--base_dir ${base_dir} \
--batch_size 8 \
--val_batch_size 12 \
--freeze_vm True \
--vis_use_lora False \
--savedmodel_path ${savepath} \
--learning_rate 1e-4 \
--gradient_clip_val 1 \
--max_length 100 \
--min_new_tokens 80 \
--max_new_tokens 120 \
--repetition_penalty 2.0 \
--length_penalty 2.0 \
--num_workers 8 \
--devices 4 \
--max_epochs 5 \
--limit_val_batches 0.5 \
--val_check_interval 0.5 \
--num_sanity_val_steps 2 \
2>&1 |tee -a ${savepath}/log.txt |