Skip to content

Commit 273dbee

Browse files
authored
Merge pull request #37 from BaiBlanc/master
pipeline parameters' default values adjusted
2 parents 3288dbf + 8542227 commit 273dbee

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

gsoc/zheyuan/pipeline/pipeline.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ if [ ! -n "$1" ] ;then
1010
echo "you have not input a project name!"
1111
else
1212
echo "The project name will be set to $1"
13-
fi
13+
1414
if [ ! -n "$2" ] ;then
1515
dimension=300
1616
elif [[ ! $2 =~ ^[0-9]*$ ]]; then
1717
echo "Please enter an integer [50|100|200|300] to the second parameter to set the dimension of Glove Embeddings;"
18+
dimension=300
1819
elif [ $2 -le 50 ]; then
1920
dimension=50
2021
echo "The dimension of GloVe embeddings is set to $dimension"
@@ -32,7 +33,7 @@ if [ ! -n "$3" ] ;then
3233
num_units=512
3334
elif [[ ! $3 =~ ^[0-9]*$ ]]; then
3435
echo "Please enter an integer [ >=512 recommended ] to the third parameter to set the number of units of LSTM cells"
35-
36+
num_units=512
3637
else
3738
num_units=$3
3839
echo "The number of units of LSTM cells is set to $num_units"
@@ -41,7 +42,7 @@ if [ ! -n "$4" ] ;then
4142
training_steps=60000
4243
elif [[ ! $4 =~ ^[0-9]*$ ]]; then
4344
echo "Please enter an integer [ >=60000 recommended ] to the fourth parameter to set the number of training steps for Learner"
44-
45+
training_steps=60000
4546
else
4647
training_steps=$4
4748
echo "The number of training steps for Learner is set to $training_steps"
@@ -50,7 +51,7 @@ if [ ! -n "$5" ] ;then
5051
examples_per_template=600
5152
elif [[ ! $5 =~ ^[0-9]*$ ]]; then
5253
echo "Please enter an integer [ >=600 recommended ] to the fifth parameter to set the number of examples per template"
53-
54+
examples_per_template=600
5455
else
5556
examples_per_template=$5
5657
echo "The number of examples per template is set to $examples_per_template"
@@ -137,4 +138,4 @@ fi
137138
python -m nmt.nmt --src=en --tgt=sparql --embed_prefix=../data/$1/embed --vocab_prefix=../data/$1/vocab --dev_prefix=../data/$1/dev --test_prefix=../data/$1/test --train_prefix=../data/$1/train --out_dir=../data/$1"_"$dimension"d_model" --num_train_steps=$training_steps --steps_per_stats=100 --num_layers=2 --num_units=$num_units --dropout=0.2 --metrics=bleu,accuracy
138139
cd ..
139140

140-
141+
fi

0 commit comments

Comments
 (0)