This folder contains scripts and configurations for experiments on TED dataset.
To download and preprocess dataset, run create_dataset.sh
. If you are in MILA
you can skip this and use already preprocessed data from /data/lisatmp4/bahdanau/data
(just set FUEL_DATA_PATH
to point to this directory).
To reproduce the results from the paper, following the procedure below.
-
Train a model with the configuration
ted12.yaml
. This should give you a model pretrained with maximum log-likelihood (main_best.tar
), and also an annealed version of it (annealing_best.tar
). The exact command is$LVSR/bin/run.py train ted12 $LVSR/exp/ted/configs/ted12.yaml
. -
Start actor-critic training using
ted16.yaml
and the additional options--start-stage critic_pretraining --params ted12/main_best.tar
. Wait until the training transitions to the main stage, the final outcome isted16/main_best.tar
. -
Use the configuration
ted17.yaml
to reproduce REINFORCE-critic results. You can start training from the main stage with parametersted16/critic_pretraining.tar
. The deliverable ismain_best.tar
. -
For REINFORCE with linear baseline, run
reinforced3.yaml
starting fromted12/main_best.tar
.
We also recommend to use the script decode.sh
for decoding. Please consult
the appendix of the paper for the exact value of the character discount.
For computing the BLEU score run
$LVSR/bin/extract_recognized.sh <$OUTPUT | $MOSES/scripts/generic/multi-bleu.perl $FUEL_DATA_PATH/TED/de-en/prep/dev.de-en.en
where $MOSES
is the path to Moses, $OUTPUT
is an output produced by $LVSR/bin/run.py search