From 735527214b9eea201b8f131c2f84e145598e52bd Mon Sep 17 00:00:00 2001 From: Roman Grundkiewicz Date: Wed, 21 Oct 2020 05:16:45 -0700 Subject: Update tests for restoring corpus and validation states --- .../restoring/corpus/test_corpus_restoration.sh | 2 ++ .../corpus/test_corpus_restoration_maxi_batch.sh | 2 ++ .../corpus/test_corpus_restoration_mini_batch_fit.sh | 2 ++ .../test_corpus_restoration_mini_batch_fit_sync.sh | 2 ++ .../corpus/test_corpus_restoration_no_shuffle.sh | 2 ++ .../corpus/test_corpus_restoration_one_epoch.sh | 2 ++ .../restoring/corpus/test_corpus_restoration_s2s.sh | 2 ++ .../corpus/test_corpus_restoration_s2s_sync.sh | 2 ++ tests/training/restoring/corpus/test_finetune.sh | 2 ++ .../restoring/corpus/test_sqlite_restoration.sh | 2 ++ .../corpus/test_sqlite_restoration_maxi_batch.sh | 2 ++ .../validation/test_adding_validator_after_restart.sh | 15 ++++++--------- .../validation/test_restoring_newbest_validators.sh | 4 ++-- .../validation/test_restoring_stalled_validators.sh | 18 ++++++++---------- .../restoring/validation/test_restoring_validation.sh | 13 +++++++------ .../test_restoring_validation_lower_is_better.sh | 13 +++++++------ .../restoring/validation/test_valid_reset_stalled.sh | 12 ++++++------ 17 files changed, 58 insertions(+), 39 deletions(-) (limited to 'tests') diff --git a/tests/training/restoring/corpus/test_corpus_restoration.sh b/tests/training/restoring/corpus/test_corpus_restoration.sh index 9937dff..905d2d0 100644 --- a/tests/training/restoring/corpus/test_corpus_restoration.sh +++ b/tests/training/restoring/corpus/test_corpus_restoration.sh @@ -11,6 +11,8 @@ test -e vocab.de.yml test -e vocab.en.yml extra_opts="--seed 1111 --maxi-batch 1 --maxi-batch-sort none --mini-batch 32 --optimizer sgd --dim-emb 128 --dim-rnn 256 --disp-freq 4" +# Added because default options has changes +extra_opts="$extra_opts --cost-type ce-mean --disp-label-counts false" # Step 1: Train a model in one go, up to the update no. 70, and save training logs diff --git a/tests/training/restoring/corpus/test_corpus_restoration_maxi_batch.sh b/tests/training/restoring/corpus/test_corpus_restoration_maxi_batch.sh index c439cb4..c36213f 100644 --- a/tests/training/restoring/corpus/test_corpus_restoration_maxi_batch.sh +++ b/tests/training/restoring/corpus/test_corpus_restoration_maxi_batch.sh @@ -11,6 +11,8 @@ test -e vocab.de.yml test -e vocab.en.yml extra_opts="--seed 1111 --maxi-batch 20 --mini-batch 32 --optimizer sgd --dim-emb 128 --dim-rnn 256 --disp-freq 4" +# Added because default options has changes +extra_opts="$extra_opts --cost-type ce-mean --disp-label-counts false" $MRT_MARIAN/marian \ -m corpus_maxi/model_full.npz -t $MRT_DATA/train.max50.{en,de} -v vocab.en.yml vocab.de.yml \ diff --git a/tests/training/restoring/corpus/test_corpus_restoration_mini_batch_fit.sh b/tests/training/restoring/corpus/test_corpus_restoration_mini_batch_fit.sh index b595126..f32aac2 100644 --- a/tests/training/restoring/corpus/test_corpus_restoration_mini_batch_fit.sh +++ b/tests/training/restoring/corpus/test_corpus_restoration_mini_batch_fit.sh @@ -11,6 +11,8 @@ test -e vocab.de.yml test -e vocab.en.yml extra_opts="--seed 5555 --maxi-batch 8 --maxi-batch-sort src --mini-batch 32 --mini-batch-fit -w 100 --optimizer sgd --dim-emb 128 --dim-rnn 256 --disp-freq 4" +# Added because default options has changes +extra_opts="$extra_opts --cost-type ce-mean --disp-label-counts false" # Step 1: Train a model in one go, up to the update no. 70, and save training logs diff --git a/tests/training/restoring/corpus/test_corpus_restoration_mini_batch_fit_sync.sh b/tests/training/restoring/corpus/test_corpus_restoration_mini_batch_fit_sync.sh index 4b8a2bb..f1b1815 100644 --- a/tests/training/restoring/corpus/test_corpus_restoration_mini_batch_fit_sync.sh +++ b/tests/training/restoring/corpus/test_corpus_restoration_mini_batch_fit_sync.sh @@ -11,6 +11,8 @@ test -e vocab.de.yml test -e vocab.en.yml extra_opts="--seed 5555 --maxi-batch 8 --maxi-batch-sort src --mini-batch 32 --mini-batch-fit -w 100 --optimizer sgd --dim-emb 128 --transformer-dim-ffn 256 --disp-freq 4 --type transformer --sync-sgd" +# Added because default options has changes +extra_opts="$extra_opts --cost-type ce-mean --disp-label-counts false" # Step 1: Train a model in one go, up to the update no. 70, and save training logs diff --git a/tests/training/restoring/corpus/test_corpus_restoration_no_shuffle.sh b/tests/training/restoring/corpus/test_corpus_restoration_no_shuffle.sh index 63105e4..7b6da5e 100644 --- a/tests/training/restoring/corpus/test_corpus_restoration_no_shuffle.sh +++ b/tests/training/restoring/corpus/test_corpus_restoration_no_shuffle.sh @@ -11,6 +11,8 @@ test -e vocab.de.yml test -e vocab.en.yml extra_opts="--seed 1234 --no-shuffle --maxi-batch 8 --maxi-batch-sort src --mini-batch 32 --mini-batch-fit -w 100 --optimizer sgd --dim-emb 128 --dim-rnn 256 --disp-freq 4" +# Added because default options has changes +extra_opts="$extra_opts --cost-type ce-mean --disp-label-counts false" $MRT_MARIAN/marian \ -m corpus_noshuf/model_full.npz -t $MRT_DATA/train.max50.{en,de} -v vocab.en.yml vocab.de.yml \ diff --git a/tests/training/restoring/corpus/test_corpus_restoration_one_epoch.sh b/tests/training/restoring/corpus/test_corpus_restoration_one_epoch.sh index 1001d74..b9e777c 100644 --- a/tests/training/restoring/corpus/test_corpus_restoration_one_epoch.sh +++ b/tests/training/restoring/corpus/test_corpus_restoration_one_epoch.sh @@ -11,6 +11,8 @@ test -e vocab.de.yml test -e vocab.en.yml extra_opts="--seed 9999 --maxi-batch 1 --maxi-batch-sort none --mini-batch 32 --optimizer sgd --dim-emb 128 --dim-rnn 256 --disp-freq 4" +# Added because default options has changes +extra_opts="$extra_opts --cost-type ce-mean --disp-label-counts false" $MRT_MARIAN/marian \ -m corpus_one/model_full.npz -t $MRT_DATA/train.max50.{en,de} -v vocab.en.yml vocab.de.yml \ diff --git a/tests/training/restoring/corpus/test_corpus_restoration_s2s.sh b/tests/training/restoring/corpus/test_corpus_restoration_s2s.sh index ab9b533..cd658c0 100644 --- a/tests/training/restoring/corpus/test_corpus_restoration_s2s.sh +++ b/tests/training/restoring/corpus/test_corpus_restoration_s2s.sh @@ -11,6 +11,8 @@ test -e vocab.de.yml test -e vocab.en.yml extra_opts="--seed 1111 --maxi-batch 1 --maxi-batch-sort none --mini-batch 32 --optimizer sgd --dim-emb 128 --dim-rnn 256 --disp-freq 4 --type s2s" +# Added because default options has changes +extra_opts="$extra_opts --cost-type ce-mean --disp-label-counts false" # Step 1: Train a model in one go, up to the update no. 70, and save training logs diff --git a/tests/training/restoring/corpus/test_corpus_restoration_s2s_sync.sh b/tests/training/restoring/corpus/test_corpus_restoration_s2s_sync.sh index 87cd06b..e8f01ba 100644 --- a/tests/training/restoring/corpus/test_corpus_restoration_s2s_sync.sh +++ b/tests/training/restoring/corpus/test_corpus_restoration_s2s_sync.sh @@ -12,6 +12,8 @@ test -e vocab.en.yml # TODO: Weight decaying in Adam is disabled, because it gives unstable results on GPU extra_opts="--seed 2222 --maxi-batch 1 --maxi-batch-sort none --mini-batch 32 --dim-emb 128 --dim-rnn 256 --disp-freq 4 --type s2s --sync-sgd --optimizer adam --optimizer-params 0.9 0.98 0" +# Added because default options has changes +extra_opts="$extra_opts --cost-type ce-mean --disp-label-counts false" # Step 1: Train a model in one go, up to the update no. 70, and save training logs diff --git a/tests/training/restoring/corpus/test_finetune.sh b/tests/training/restoring/corpus/test_finetune.sh index d9b01d8..1e99645 100644 --- a/tests/training/restoring/corpus/test_finetune.sh +++ b/tests/training/restoring/corpus/test_finetune.sh @@ -17,6 +17,8 @@ test -e vocab.de.yml test -e vocab.en.yml extra_opts="--seed 2222 --maxi-batch 1 --maxi-batch-sort none --mini-batch 64 --optimizer sgd --dim-emb 128 --dim-rnn 256 --disp-freq 4" +# Added because default options has changes +extra_opts="$extra_opts --cost-type ce-mean --disp-label-counts false" # Train a model on a training corpus diff --git a/tests/training/restoring/corpus/test_sqlite_restoration.sh b/tests/training/restoring/corpus/test_sqlite_restoration.sh index 369cfad..7197de8 100644 --- a/tests/training/restoring/corpus/test_sqlite_restoration.sh +++ b/tests/training/restoring/corpus/test_sqlite_restoration.sh @@ -11,6 +11,8 @@ test -e vocab.de.yml test -e vocab.en.yml extra_opts="--seed 3333 --maxi-batch 1 --maxi-batch-sort none --mini-batch 32 --optimizer sgd --dim-emb 128 --dim-rnn 256 --disp-freq 4" +# Added because default options has changes +extra_opts="$extra_opts --cost-type ce-mean --disp-label-counts false" $MRT_MARIAN/marian \ -m sqlite/model_full.npz -t $MRT_DATA/train.max50.{en,de} -v vocab.en.yml vocab.de.yml \ diff --git a/tests/training/restoring/corpus/test_sqlite_restoration_maxi_batch.sh b/tests/training/restoring/corpus/test_sqlite_restoration_maxi_batch.sh index 77305c5..b45e1fa 100644 --- a/tests/training/restoring/corpus/test_sqlite_restoration_maxi_batch.sh +++ b/tests/training/restoring/corpus/test_sqlite_restoration_maxi_batch.sh @@ -11,6 +11,8 @@ test -e vocab.de.yml test -e vocab.en.yml extra_opts="--seed 4444 --maxi-batch 20 --mini-batch 32 --optimizer sgd --dim-emb 128 --dim-rnn 256 --disp-freq 4" +# Added because default options has changes +extra_opts="$extra_opts --cost-type ce-mean --disp-label-counts false" $MRT_MARIAN/marian \ -m sqlite_maxi/model_full.npz -t $MRT_DATA/train.max50.{en,de} -v vocab.en.yml vocab.de.yml \ diff --git a/tests/training/restoring/validation/test_adding_validator_after_restart.sh b/tests/training/restoring/validation/test_adding_validator_after_restart.sh index e8ef741..ff95d90 100644 --- a/tests/training/restoring/validation/test_adding_validator_after_restart.sh +++ b/tests/training/restoring/validation/test_adding_validator_after_restart.sh @@ -7,10 +7,11 @@ set -e rm -rf valid_add valid_add_?.log mkdir -p valid_add +extra_opts="--no-shuffle --seed 2222 --maxi-batch 1 --maxi-batch-sort none --optimizer sgd" +extra_opts="$extra_opts --dim-emb 128 --dim-rnn 256 --mini-batch 16" +extra_opts="$extra_opts --cost-type ce-mean --disp-label-counts false" -#$MRT_MARIAN/marian \ - #--no-shuffle --seed 2222 --maxi-batch 1 --maxi-batch-sort none --optimizer sgd \ - #--dim-emb 128 --dim-rnn 256 --mini-batch 16 \ +#$MRT_MARIAN/marian $extra_opts \ #-m valid_add/model.npz -t $MRT_DATA/europarl.de-en/corpus.bpe.{en,de} -v vocab.en.yml vocab.de.yml \ #--disp-freq 10 --valid-freq 20 --after-batches 200 --early-stopping 5 \ #--valid-metrics cross-entropy perplexity \ @@ -21,9 +22,7 @@ mkdir -p valid_add #exit 1 -$MRT_MARIAN/marian \ - --no-shuffle --seed 2222 --maxi-batch 1 --maxi-batch-sort none --optimizer sgd \ - --dim-emb 128 --dim-rnn 256 --mini-batch 16 \ +$MRT_MARIAN/marian $extra_opts \ -m valid_add/model.npz -t $MRT_DATA/europarl.de-en/corpus.bpe.{en,de} -v vocab.en.yml vocab.de.yml \ --disp-freq 10 --valid-freq 20 --after-batches 100 --early-stopping 5 \ --valid-metrics cross-entropy \ @@ -37,9 +36,7 @@ test -e valid_add_1.log cp valid_add/model.npz.progress.yml valid_add/model.npz.progress.yml.bac cat valid_add_1.log | $MRT_TOOLS/strip-timestamps.sh > valid_add.out -$MRT_MARIAN/marian \ - --no-shuffle --seed 2222 --maxi-batch 1 --maxi-batch-sort none --optimizer sgd \ - --dim-emb 128 --dim-rnn 256 --mini-batch 16 \ +$MRT_MARIAN/marian $extra_opts \ -m valid_add/model.npz -t $MRT_DATA/europarl.de-en/corpus.bpe.{en,de} -v vocab.en.yml vocab.de.yml \ --disp-freq 10 --valid-freq 20 --after-batches 200 --early-stopping 5 \ --valid-metrics cross-entropy ce-mean-words \ diff --git a/tests/training/restoring/validation/test_restoring_newbest_validators.sh b/tests/training/restoring/validation/test_restoring_newbest_validators.sh index f1b8dc4..444599b 100644 --- a/tests/training/restoring/validation/test_restoring_newbest_validators.sh +++ b/tests/training/restoring/validation/test_restoring_newbest_validators.sh @@ -15,7 +15,7 @@ head -n 8 $MRT_DATA/europarl.de-en/toy.bpe.de > valid.mini.bpe.de #$MRT_MARIAN/marian \ #--type s2s --no-shuffle --seed 2222 --maxi-batch 1 --maxi-batch-sort none --quiet-translation \ - #--dim-emb 64 --dim-rnn 128 --mini-batch 16 --optimizer sgd \ + #--dim-emb 64 --dim-rnn 128 --mini-batch 16 --optimizer sgd --cost-type ce-mean \ #-m valid_newbest/model.npz -t $MRT_DATA/europarl.de-en/toy.bpe.{en,de} -v vocab.en.yml vocab.de.yml \ #--disp-freq 5 --valid-freq 10 --after-batches 100 \ #--valid-metrics cross-entropy translation --valid-script-path ./count_bytes.sh \ @@ -29,7 +29,7 @@ head -n 8 $MRT_DATA/europarl.de-en/toy.bpe.de > valid.mini.bpe.de $MRT_MARIAN/marian \ --type s2s --no-shuffle --seed 2222 --maxi-batch 1 --maxi-batch-sort none --quiet-translation \ - --dim-emb 64 --dim-rnn 128 --mini-batch 16 --optimizer sgd \ + --dim-emb 64 --dim-rnn 128 --mini-batch 16 --optimizer sgd --cost-type ce-mean \ -m valid_newbest/model.npz -t $MRT_DATA/europarl.de-en/toy.bpe.{en,de} -v vocab.en.yml vocab.de.yml \ --disp-freq 5 --valid-freq 10 --after-batches 50 \ --valid-metrics cross-entropy translation --valid-script-path ./count_bytes.sh \ diff --git a/tests/training/restoring/validation/test_restoring_stalled_validators.sh b/tests/training/restoring/validation/test_restoring_stalled_validators.sh index 358c272..50a6d2e 100644 --- a/tests/training/restoring/validation/test_restoring_stalled_validators.sh +++ b/tests/training/restoring/validation/test_restoring_stalled_validators.sh @@ -7,16 +7,18 @@ set -e rm -rf valid_stalled valid_stalled_?.*log valid_script_?.temp mkdir -p valid_stalled +extra_opts="--no-shuffle --seed 2222 --maxi-batch 1 --maxi-batch-sort none --quiet-translation" +extra_opts="$extra_opts --dim-emb 64 --dim-rnn 128 --mini-batch 16 --optimizer sgd" +extra_opts="$extra_opts --cost-type ce-mean --disp-label-counts false" + + head -n 8 $MRT_DATA/europarl.de-en/toy.bpe.en > valid.mini.bpe.en head -n 8 $MRT_DATA/europarl.de-en/toy.bpe.de > valid.mini.bpe.de - # Uncomment to re-generate the expected output #mkdir -p valid_stalled_full -#$MRT_MARIAN/marian \ - #--no-shuffle --seed 2222 --maxi-batch 1 --maxi-batch-sort none --quiet-translation \ - #--dim-emb 64 --dim-rnn 128 --mini-batch 16 --optimizer sgd \ +#$MRT_MARIAN/marian $extra_opts \ #-m valid_stalled_full/model.npz -t $MRT_DATA/europarl.de-en/toy.bpe.{en,de} -v vocab.en.yml vocab.de.yml \ #--disp-freq 10 --valid-freq 20 --after-batches 200 --early-stopping 5 \ #--valid-metrics cross-entropy valid-script translation --valid-script-path ./valid_script_ab.sh \ @@ -33,9 +35,7 @@ head -n 8 $MRT_DATA/europarl.de-en/toy.bpe.de > valid.mini.bpe.de #exit 1 -$MRT_MARIAN/marian \ - --no-shuffle --seed 2222 --maxi-batch 1 --maxi-batch-sort none --quiet-translation \ - --dim-emb 64 --dim-rnn 128 --mini-batch 16 --optimizer sgd \ +$MRT_MARIAN/marian $extra_opts \ -m valid_stalled/model.npz -t $MRT_DATA/europarl.de-en/toy.bpe.{en,de} -v vocab.en.yml vocab.de.yml \ --disp-freq 10 --valid-freq 20 --after-batches 100 --early-stopping 5 \ --valid-metrics cross-entropy valid-script translation --valid-script-path ./valid_script_ab.sh \ @@ -53,9 +53,7 @@ cat valid_stalled_1.log | $MRT_TOOLS/strip-timestamps.sh \ | head -n -1 > valid_stalled.out -$MRT_MARIAN/marian \ - --no-shuffle --seed 2222 --maxi-batch 1 --maxi-batch-sort none --quiet-translation \ - --dim-emb 64 --dim-rnn 128 --mini-batch 16 --optimizer sgd \ +$MRT_MARIAN/marian $extra_opts \ -m valid_stalled/model.npz -t $MRT_DATA/europarl.de-en/toy.bpe.{en,de} -v vocab.en.yml vocab.de.yml \ --disp-freq 10 --valid-freq 20 --after-batches 200 --early-stopping 5 \ --valid-metrics cross-entropy valid-script translation --valid-script-path ./valid_script_ab.sh \ diff --git a/tests/training/restoring/validation/test_restoring_validation.sh b/tests/training/restoring/validation/test_restoring_validation.sh index bdc81b7..483e408 100644 --- a/tests/training/restoring/validation/test_restoring_validation.sh +++ b/tests/training/restoring/validation/test_restoring_validation.sh @@ -7,9 +7,12 @@ set -e rm -rf valid valid_?.log valid_script.temp mkdir -p valid -$MRT_MARIAN/marian \ - --no-shuffle --seed 2222 --maxi-batch 1 --maxi-batch-sort none \ - --dim-emb 128 --dim-rnn 256 --mini-batch 16 \ +extra_opts="--no-shuffle --seed 2222 --maxi-batch 1 --maxi-batch-sort none" +extra_opts="$extra_opts --dim-emb 128 --dim-rnn 256 --mini-batch 16" +extra_opts="$extra_opts --cost-type ce-mean --disp-label-counts false" + + +$MRT_MARIAN/marian $extra_opts \ -m valid/model.npz -t $MRT_DATA/europarl.de-en/corpus.bpe.{en,de} -v vocab.en.yml vocab.de.yml \ --disp-freq 10 --valid-freq 20 --after-batches 150 --early-stopping 5 \ --valid-metrics valid-script cross-entropy --valid-script-path ./valid_script.sh \ @@ -23,9 +26,7 @@ test -e valid_1.log cp valid/model.npz.progress.yml valid/model.npz.progress.yml.bac cat valid_1.log | $MRT_TOOLS/strip-timestamps.sh | grep "valid-script" > valid.out -$MRT_MARIAN/marian \ - --no-shuffle --seed 2222 --maxi-batch 1 --maxi-batch-sort none \ - --dim-emb 128 --dim-rnn 256 --mini-batch 16 \ +$MRT_MARIAN/marian $extra_opts \ -m valid/model.npz -t $MRT_DATA/europarl.de-en/corpus.bpe.{en,de} -v vocab.en.yml vocab.de.yml \ --disp-freq 10 --valid-freq 20 --after-batches 300 --early-stopping 5 \ --valid-metrics valid-script cross-entropy --valid-script-path ./valid_script.sh \ diff --git a/tests/training/restoring/validation/test_restoring_validation_lower_is_better.sh b/tests/training/restoring/validation/test_restoring_validation_lower_is_better.sh index 33ad8d0..a29e534 100644 --- a/tests/training/restoring/validation/test_restoring_validation_lower_is_better.sh +++ b/tests/training/restoring/validation/test_restoring_validation_lower_is_better.sh @@ -7,10 +7,13 @@ set -e rm -rf valid_lowisbet valid_lowisbet_?.log mkdir -p valid_lowisbet +extra_opts="--no-shuffle --seed 1111 --maxi-batch 1 --maxi-batch-sort none" +extra_opts="$extra_opts --dim-emb 64 --dim-rnn 128 --mini-batch 32" +extra_opts="$extra_opts --cost-type ce-mean --disp-label-counts false" + + # Files for the validation sets are swapped intentionally -$MRT_MARIAN/marian \ - --no-shuffle --seed 1111 --maxi-batch 1 --maxi-batch-sort none \ - --dim-emb 64 --dim-rnn 128 --mini-batch 32 \ +$MRT_MARIAN/marian $extra_opts \ -m valid_lowisbet/model.npz -t $MRT_DATA/train.max50.{en,de} -v vocab.en.yml vocab.de.yml \ --disp-freq 10 --valid-freq 30 --after-batches 160 --early-stopping 2 \ --valid-metrics cross-entropy --valid-sets $MRT_DATA/europarl.de-en/toy.bpe.{de,en} --valid-mini-batch 64 \ @@ -24,9 +27,7 @@ cp valid_lowisbet/model.npz.progress.yml valid_lowisbet/model.npz.progress.yml.b cat valid_lowisbet_1.log | $MRT_TOOLS/strip-timestamps.sh | grep "cross-entropy" > valid_lowisbet.out # Files for the validation sets are swapped intentionally -$MRT_MARIAN/marian \ - --no-shuffle --seed 1111 --maxi-batch 1 --maxi-batch-sort none \ - --dim-emb 64 --dim-rnn 128 --mini-batch 32 \ +$MRT_MARIAN/marian $extra_opts \ -m valid_lowisbet/model.npz -t $MRT_DATA/train.max50.{en,de} -v vocab.en.yml vocab.de.yml \ --disp-freq 10 --valid-freq 30 --after-batches 320 --early-stopping 4 \ --valid-metrics cross-entropy --valid-sets $MRT_DATA/europarl.de-en/toy.bpe.{de,en} --valid-mini-batch 64 \ diff --git a/tests/training/restoring/validation/test_valid_reset_stalled.sh b/tests/training/restoring/validation/test_valid_reset_stalled.sh index 02b24a5..3e96636 100644 --- a/tests/training/restoring/validation/test_valid_reset_stalled.sh +++ b/tests/training/restoring/validation/test_valid_reset_stalled.sh @@ -16,11 +16,13 @@ mkdir -p valid_reset_stalled test -s valid.mini.bpe.en || head -n 8 $MRT_DATA/europarl.de-en/toy.bpe.en > valid.mini.bpe.en test -s valid.mini.bpe.de || head -n 8 $MRT_DATA/europarl.de-en/toy.bpe.de > valid.mini.bpe.de +extra_opts="--no-shuffle --seed 222 --maxi-batch 1 --maxi-batch-sort none" +extra_opts="$extra_opts --dim-emb 64 --dim-rnn 128 --mini-batch 16 --optimizer sgd" +extra_opts="$extra_opts --cost-type ce-mean --disp-label-counts false" + # Train a model for a while and stop -$MRT_MARIAN/marian \ - --no-shuffle --seed 2222 --maxi-batch 1 --maxi-batch-sort none --quiet-translation \ - --dim-emb 64 --dim-rnn 128 --mini-batch 16 --optimizer sgd \ +$MRT_MARIAN/marian $extra_opts \ -m valid_reset_stalled/model.npz -t $MRT_DATA/europarl.de-en/toy.bpe.{en,de} -v vocab.en.yml vocab.de.yml \ --disp-freq 10 --valid-freq 20 --after-batches 140 --early-stopping 5 \ --valid-metrics translation valid-script cross-entropy --valid-script-path ./valid_script_ab.sh \ @@ -36,9 +38,7 @@ cat valid_reset_stalled_1.log | $MRT_TOOLS/strip-timestamps.sh | grep -P "\[vali # Restart training with --valid-reset-stalled -$MRT_MARIAN/marian \ - --no-shuffle --seed 2222 --maxi-batch 1 --maxi-batch-sort none --quiet-translation \ - --dim-emb 64 --dim-rnn 128 --mini-batch 16 --optimizer sgd \ +$MRT_MARIAN/marian $extra_opts \ -m valid_reset_stalled/model.npz -t $MRT_DATA/europarl.de-en/toy.bpe.{en,de} -v vocab.en.yml vocab.de.yml \ --disp-freq 10 --valid-freq 20 --after-batches 200 --early-stopping 5 --valid-reset-stalled \ --valid-metrics translation valid-script cross-entropy --valid-script-path ./valid_script_ab.sh \ -- cgit v1.2.3