-
Notifications
You must be signed in to change notification settings - Fork 5
/
run_class.sh
executable file
·49 lines (44 loc) · 1.06 KB
/
run_class.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
#!/bin/bash
# remember to add --save when you want to save the experiment log
# ./run_class.sh 1 fb15k TransE --save
GPU=$1
DATASET=$2
MODEL=$3
ARGS="$4 $5 $6 $7"
DIM=(32)
LR=(0.01)
SEED=(12306)
if [ ${DATASET} == "am" ]
then
ALPHA=(0.3)
LAYER=(2)
elif [ ${DATASET} == "wordnet" ]
then
ALPHA=(0.5)
LAYER=(2)
elif [ ${DATASET} == "fb15k" ]
then
ALPHA=(0.5)
LAYER=(0)
fi
for alpha in "${ALPHA[@]}"
do
for layer in "${LAYER[@]}"
do
for dim in "${DIM[@]}"
do
for lr in "${LR[@]}"
do
for seed in "${SEED[@]}"
do
option="--dataset ${DATASET} --dim ${dim} --mode ${MODEL} --learning_rate ${lr}
--alpha ${alpha} --beta ${alpha} --layer ${layer} --rel_update
--epochs 1000 --randomseed ${seed} ${ARGS}"
cmd="CUDA_VISIBLE_DEVICES=${GPU} python train_class.py ${option}"
echo $cmd
eval $cmd
done
done
done
done
done