-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
28 lines (20 loc) · 880 Bytes
/
run.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
28
DATASET="brats2018"
### pretrain
declare -a METHODS=("SimCLR" "SimSiam" "MoCo" "BYOL" "SimMIM")
for METHOD in "${METHODS[@]}"
do
python ./pretrain.py --name "$DATASET-$METHOD" --config "configs/$DATASET/gpu.yaml" --method "$METHOD"
done
### train
declare -a METHODS=("SimCLR" "SimSiam" "MoCo" "BYOL" "SimMIM")
for METHOD in "${METHODS[@]}"
do
python ./train.py --name "$DATASET-$METHOD" --config "configs/$DATASET/gpu.yaml" --data "./data/$DATASET/" --weights "./middle/pretrain/models/$DATASET-$METHOD/last.pth"
done
### test
declare -a METHODS=("SimCLR" "SimSiam" "MoCo" "BYOL" "SimMIM")
for METHOD in "${METHODS[@]}"
do
python ./test.py --config "./configs/$DATASET/gpu.yaml" --model_path "./middle/models/$DATASET-$METHOD/best.pth"
python ./post_process.py --config "./configs/$DATASET/gpu.yaml" --pred_dir "./middle/test/$DATASET-$METHOD/preds/"
done