-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtrain.sh
26 lines (22 loc) · 901 Bytes
/
train.sh
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
#!/bin/bash
# modify these augments if you want to try other datasets, splits or methods
# dataset: ['pascal', 'cityscapes', 'ade20k', 'coco']
# method: ['unimatch_v2', 'fixmatch', 'supervised']
# exp: just for specifying the 'save_path'
# split: ['92', '1_16', ...]. Please check directory './splits/$dataset' for concrete splits
dataset='pascal'
method='unimatch_v2'
exp='dinov2_small'
split='366'
config=configs/${dataset}.yaml
labeled_id_path=splits/$dataset/$split/labeled.txt
unlabeled_id_path=splits/$dataset/$split/unlabeled.txt
save_path=exp/$dataset/$method/$exp/$split
mkdir -p $save_path
python -m torch.distributed.launch \
--nproc_per_node=$1 \
--master_addr=localhost \
--master_port=$2 \
$method.py \
--config=$config --labeled-id-path $labeled_id_path --unlabeled-id-path $unlabeled_id_path \
--save-path $save_path --port $2 2>&1 | tee $save_path/out.log