forked from d-ailin/GDN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
59 lines (54 loc) · 1.3 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
gpu_n=$1
DATASET=$2
seed=5
BATCH_SIZE=32
SLIDE_WIN=5
dim=64
out_layer_num=1
SLIDE_STRIDE=1
topk=5
out_layer_inter_dim=128
val_ratio=0.2
decay=0
path_pattern="${DATASET}"
COMMENT="${DATASET}"
EPOCH=30
report='best'
if [[ "$gpu_n" == "cpu" ]]; then
python main.py \
-dataset $DATASET \
-save_path_pattern $path_pattern \
-slide_stride $SLIDE_STRIDE \
-slide_win $SLIDE_WIN \
-batch $BATCH_SIZE \
-epoch $EPOCH \
-comment $COMMENT \
-random_seed $seed \
-decay $decay \
-dim $dim \
-out_layer_num $out_layer_num \
-out_layer_inter_dim $out_layer_inter_dim \
-decay $decay \
-val_ratio $val_ratio \
-report $report \
-topk $topk \
-device 'cpu'
else
CUDA_VISIBLE_DEVICES=$gpu_n python main.py \
-dataset $DATASET \
-save_path_pattern $path_pattern \
-slide_stride $SLIDE_STRIDE \
-slide_win $SLIDE_WIN \
-batch $BATCH_SIZE \
-epoch $EPOCH \
-comment $COMMENT \
-random_seed $seed \
-decay $decay \
-dim $dim \
-out_layer_num $out_layer_num \
-out_layer_inter_dim $out_layer_inter_dim \
-decay $decay \
-val_ratio $val_ratio \
-report $report \
-topk $topk
fi