-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtrain.sh
More file actions
executable file
·22 lines (20 loc) · 878 Bytes
/
train.sh
File metadata and controls
executable file
·22 lines (20 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
seeds=(0) # List of seeds
for seed in "${seeds[@]}"; do
echo "Starting training with seed $seed"
python src/train.py \
--model_path "facebook/sam-vit-base" \
--root_dir /home/magnus/Datasets/Images/TrashCan1.0/dataset/instance_version \
--train_annotation_file /home/magnus/Datasets/Images/TrashCan1.0/dataset/instance_version/instances_train_trashcan.json \
--val_annotation_file /home/magnus/Datasets/Images/TrashCan1.0/dataset/instance_version/instances_val_trashcan.json \
--output_dir ./results/seed_$seed \
--train_batch_size 8 \
--eval_batch_size 8 \
--num_train_epochs 8 \
--learning_rate 2e-4 \
--data_loader_num_workers 16 \
--weight_decay 10 \
--gradient_accumulation_steps 2 \
--seed $seed
echo "Finished training with seed $seed"
done