-
Notifications
You must be signed in to change notification settings - Fork 24
/
google_seq2seq_train_jul_5_2017_1.sh
44 lines (39 loc) · 1.25 KB
/
google_seq2seq_train_jul_5_2017_1.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
#!/usr/bin/env bash
export CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export MODEL_DIR=${CURRENT_DIR}/model_working_directory/jul_5_2017_1
export DATA_PATH=${CURRENT_DIR}/processed_data
export VOCAB_SOURCE=${DATA_PATH}/vocab
export VOCAB_TARGET=${DATA_PATH}/vocab
export TRAIN_SOURCES=${DATA_PATH}/train_sources
export TRAIN_TARGETS=${DATA_PATH}/train_targets
export DEV_SOURCES=${DATA_PATH}/valid_sources
export DEV_TARGETS=${DATA_PATH}/valid_targets
export TRAIN_STEPS=1000000
mkdir -p $MODEL_DIR
python -m bin.train \
--config_paths="
./example_configs/nmt_large_jul_5_2017_1.yml,
./example_configs/train_seq2seq_jul_5_2017_1.yml,
./example_configs/text_metrics_bpe.yml" \
--model_params "
vocab_source: $VOCAB_SOURCE
vocab_target: $VOCAB_TARGET" \
--input_pipeline_train "
class: ParallelTextInputPipeline
params:
source_files:
- $TRAIN_SOURCES
target_files:
- $TRAIN_TARGETS" \
--input_pipeline_dev "
class: ParallelTextInputPipeline
params:
source_files:
- $DEV_SOURCES
target_files:
- $DEV_TARGETS" \
--batch_size 32 \
--output_dir $MODEL_DIR \
--eval_every_n_steps 4000 \
--save_checkpoints_steps 4000 \
--keep_checkpoint_max 0