-
Notifications
You must be signed in to change notification settings - Fork 59
/
train.sh
27 lines (23 loc) · 920 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
27
#!/bin/bash
now=$(date +"%Y%m%d_%H%M%S")
# modify these augments if you want to try other datasets, splits or methods
# dataset: ['pascal', 'cityscapes', 'coco']
# method: ['unimatch', 'fixmatch', 'supervised']
# exp: just for specifying the 'save_path'
# split: ['92', '1_16', 'u2pl_1_16', ...]. Please check directory './splits/$dataset' for concrete splits
dataset='pascal'
method='unimatch'
exp='r101'
split='732'
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/$now.log