-
Notifications
You must be signed in to change notification settings - Fork 11
/
01_run_training.sh
executable file
·40 lines (34 loc) · 1.2 KB
/
01_run_training.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
#!/usr/bin/env bash
echo "[INFO] aggregate sources from yoruba-text, split & strip to make parallel text"
python3 ./src/aggregate_corpora_make_parallel_text.py
if [ $? -eq 0 ]; then
echo "OKAY"
else
echo "TRAINING PREPROCESSING FAIL"
exit 1
fi
echo "[INFO] remove old tensorboard runs, and preprocessed files"
rm data/*.pt
# don't delete previous runs
# rm -rf runs/*
echo "[INFO] preprocess training data"
python3 ./src/preprocess.py -train_src ./data/train/sources.txt \
-train_tgt ./data/train/targets.txt \
-valid_src ./data/dev/sources.txt \
-valid_tgt ./data/dev/targets.txt \
-save_data ./data/demo
echo "[INFO] running Bahdanau seq2seq training, for GPU training add: -gpuid 0 "
# python3 ./src/train.py -world_size 1 -gpu_ranks 0 \
python3 ./src/train.py \
-data data/demo \
-save_model models/yo_adr_bahdanau_lstm_128_2_2_sans_yoglobalvoices_all_in_take2 \
-save_checkpoint_steps 500 \
-tensorboard \
-enc_layers 2 \
-dec_layers 2 \
-rnn_size 128 \
-rnn_type LSTM \
-global_attention dot \
-optim adam \
-learning_rate 0.001 \
-learning_rate_decay 0.7