-
Notifications
You must be signed in to change notification settings - Fork 5
/
run_rel_align.sh
executable file
·46 lines (42 loc) · 1.17 KB
/
run_rel_align.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
#!/bin/bash
# remember to add --save when you want to save the experiment log
# ./run_rel_align.sh 4 all TransE --save
GPU=$1
DATASET=$2
MODEL=$3
ARGS="$4 $5 $6 $7"
ALPHA=(0.3)
LAYER=(2)
SEED=(12306)
SREL=(0)
WREL=(0.0)
if [ ${DATASET} == "all" ]
then
DATASETS=("zh_en" "ja_en" "fr_en")
else
DATASETS=(${DATASET})
fi
for dataset in "${DATASETS[@]}"
do
for alpha in "${ALPHA[@]}"
do
for layer in "${LAYER[@]}"
do
for seed in "${SEED[@]}"
do
for srel in "${SREL[@]}"
do
for wrel in "${WREL[@]}"
do
option="--dataset ${dataset} --dim 200 --mode ${MODEL} --learning_rate 0.01
--alpha ${alpha} --beta ${alpha} --layer ${layer} --auto --rel_update --epochs 20000
--randomseed ${seed} --rel_weight ${wrel} --rel_seed ${srel} ${ARGS}"
cmd="CUDA_VISIBLE_DEVICES=${GPU} python train_rel_align.py ${option}"
echo $cmd
eval $cmd
done
done
done
done
done
done