-
Notifications
You must be signed in to change notification settings - Fork 319
/
test.sh
45 lines (38 loc) · 806 Bytes
/
test.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
if [ $epoch_time ]; then
EPOCH_TIME=$epoch_time
else
EPOCH_TIME=150
fi
if [ $out_dir ]; then
OUT_DIR=$out_dir
else
OUT_DIR='./model_out'
fi
if [ $cfg ]; then
CFG=$cfg
else
CFG='configs/swin_tiny_patch4_window7_224_lite.yaml'
fi
if [ $data_dir ]; then
DATA_DIR=$data_dir
else
DATA_DIR='datasets/Synapse'
fi
if [ $learning_rate ]; then
LEARNING_RATE=$learning_rate
else
LEARNING_RATE=0.05
fi
if [ $img_size ]; then
IMG_SIZE=$img_size
else
IMG_SIZE=224
fi
if [ $batch_size ]; then
BATCH_SIZE=$batch_size
else
BATCH_SIZE=24
fi
echo "start test model"
python test.py --dataset Synapse --cfg $CFG --root_path $DATA_DIR --max_epochs $EPOCH_TIME --output_dir $OUT_DIR --img_size $IMG_SIZE --base_lr $LEARNING_RATE --batch_size $BATCH_SIZE