-
Notifications
You must be signed in to change notification settings - Fork 21
/
experiment-emb.sh
executable file
·46 lines (40 loc) · 1.14 KB
/
experiment-emb.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
export PYTHONPATH=`pwd`
echo $PYTHONPATH
source $1
exp=$2
gpu=$3
ARGS=${@:4}
add_reversed_training_edges_flag=''
if [[ $add_reversed_training_edges = *"True"* ]]; then
add_reversed_training_edges_flag="--add_reversed_training_edges"
fi
group_examples_by_query_flag=''
if [[ $group_examples_by_query = *"True"* ]]; then
group_examples_by_query_flag="--group_examples_by_query"
fi
cmd="python3.6 -m src.experiments \
--data_dir $data_dir \
$exp \
--model $model \
--entity_dim $entity_dim \
--relation_dim $relation_dim \
--num_rollouts $num_rollouts \
--bucket_interval $bucket_interval \
--num_epochs $num_epochs \
--num_wait_epochs $num_wait_epochs \
--batch_size $batch_size \
--train_batch_size $train_batch_size \
--dev_batch_size $dev_batch_size \
--num_negative_samples $num_negative_samples \
--margin $margin \
--learning_rate $learning_rate \
--grad_norm $grad_norm \
--emb_dropout_rate $emb_dropout_rate \
--beam_size $beam_size \
$group_examples_by_query_flag \
$add_reversed_training_edges_flag \
--gpu $gpu \
$ARGS"
echo "Executing $cmd"
$cmd