From da35a4d1617231cd3735e2ec947bb0f0dfef69f5 Mon Sep 17 00:00:00 2001 From: Mirco Ravanelli Date: Thu, 9 Nov 2023 09:40:38 -0500 Subject: [PATCH] fix norm (#2237) --- .../ST/transformer/hparams/conformer.yaml | 2 +- .../ST/transformer/hparams/transformer.yaml | 2 +- .../AST/transformer/hparams/train_w2v2_st.yaml | 2 +- .../ASR/transformer/hparams/conformer_medium.yaml | 2 +- .../ASR/transformer/hparams/branchformer_large.yaml | 2 +- .../ASR/transformer/hparams/conformer_large.yaml | 2 +- .../ASR/transformer/hparams/conformer_small.yaml | 2 +- .../ASR/transformer/hparams/hyperbranchformer_13M.yaml | 2 +- .../ASR/transformer/hparams/hyperbranchformer_25M.yaml | 2 +- .../ASR/transformer/hparams/hyperconformer_22M.yaml | 2 +- .../ASR/transformer/hparams/hyperconformer_8M.yaml | 2 +- .../LibriSpeech/ASR/transformer/hparams/transformer.yaml | 2 +- .../LibriSpeech/G2P/hparams/hparams_g2p_transformer.yaml | 6 +++--- .../Switchboard/ASR/transformer/hparams/transformer.yaml | 2 +- .../ASR/transformer/hparams/transformer_finetuned_LM.yaml | 2 +- .../ASR/transformer/hparams/branchformer_large.yaml | 2 +- 16 files changed, 18 insertions(+), 18 deletions(-) diff --git a/recipes/Fisher-Callhome-Spanish/ST/transformer/hparams/conformer.yaml b/recipes/Fisher-Callhome-Spanish/ST/transformer/hparams/conformer.yaml index 345cf0409a..b51cd37a55 100644 --- a/recipes/Fisher-Callhome-Spanish/ST/transformer/hparams/conformer.yaml +++ b/recipes/Fisher-Callhome-Spanish/ST/transformer/hparams/conformer.yaml @@ -200,7 +200,7 @@ valid_search: !new:speechbrain.decoders.S2STransformerBeamSearcher max_decode_ratio: !ref beam_size: !ref using_eos_threshold: False - length_normalization: False + length_normalization: True test_search: !new:speechbrain.decoders.S2STransformerBeamSearcher modules: [!ref , !ref ] diff --git a/recipes/Fisher-Callhome-Spanish/ST/transformer/hparams/transformer.yaml b/recipes/Fisher-Callhome-Spanish/ST/transformer/hparams/transformer.yaml index 730af8f545..e8c739ab4f 100644 --- a/recipes/Fisher-Callhome-Spanish/ST/transformer/hparams/transformer.yaml +++ b/recipes/Fisher-Callhome-Spanish/ST/transformer/hparams/transformer.yaml @@ -205,7 +205,7 @@ valid_search: !new:speechbrain.decoders.S2STransformerBeamSearcher max_decode_ratio: !ref beam_size: !ref using_eos_threshold: False - length_normalization: False + length_normalization: True test_search: !new:speechbrain.decoders.S2STransformerBeamSearcher modules: [!ref , !ref ] diff --git a/recipes/IWSLT22_lowresource/AST/transformer/hparams/train_w2v2_st.yaml b/recipes/IWSLT22_lowresource/AST/transformer/hparams/train_w2v2_st.yaml index 4487818202..6bfb9db127 100644 --- a/recipes/IWSLT22_lowresource/AST/transformer/hparams/train_w2v2_st.yaml +++ b/recipes/IWSLT22_lowresource/AST/transformer/hparams/train_w2v2_st.yaml @@ -181,7 +181,7 @@ valid_search: !new:speechbrain.decoders.S2STransformerBeamSearcher max_decode_ratio: !ref beam_size: !ref using_eos_threshold: False - length_normalization: False + length_normalization: True test_search: !new:speechbrain.decoders.S2STransformerBeamSearcher modules: [!ref , !ref ] diff --git a/recipes/KsponSpeech/ASR/transformer/hparams/conformer_medium.yaml b/recipes/KsponSpeech/ASR/transformer/hparams/conformer_medium.yaml index 2137010a37..0192fb7190 100644 --- a/recipes/KsponSpeech/ASR/transformer/hparams/conformer_medium.yaml +++ b/recipes/KsponSpeech/ASR/transformer/hparams/conformer_medium.yaml @@ -203,7 +203,7 @@ valid_search: !new:speechbrain.decoders.S2STransformerBeamSearcher max_decode_ratio: !ref beam_size: !ref using_eos_threshold: False - length_normalization: False + length_normalization: True scorer: !ref test_search: !new:speechbrain.decoders.S2STransformerBeamSearcher diff --git a/recipes/LibriSpeech/ASR/transformer/hparams/branchformer_large.yaml b/recipes/LibriSpeech/ASR/transformer/hparams/branchformer_large.yaml index 45e766922a..ec35454227 100644 --- a/recipes/LibriSpeech/ASR/transformer/hparams/branchformer_large.yaml +++ b/recipes/LibriSpeech/ASR/transformer/hparams/branchformer_large.yaml @@ -233,7 +233,7 @@ valid_search: !new:speechbrain.decoders.S2STransformerBeamSearcher max_decode_ratio: !ref beam_size: !ref using_eos_threshold: False - length_normalization: False + length_normalization: True scorer: !ref test_search: !new:speechbrain.decoders.S2STransformerBeamSearcher diff --git a/recipes/LibriSpeech/ASR/transformer/hparams/conformer_large.yaml b/recipes/LibriSpeech/ASR/transformer/hparams/conformer_large.yaml index dbbde5d26a..718ce349bc 100644 --- a/recipes/LibriSpeech/ASR/transformer/hparams/conformer_large.yaml +++ b/recipes/LibriSpeech/ASR/transformer/hparams/conformer_large.yaml @@ -225,7 +225,7 @@ valid_search: !new:speechbrain.decoders.S2STransformerBeamSearcher max_decode_ratio: !ref beam_size: !ref using_eos_threshold: False - length_normalization: False + length_normalization: True scorer: !ref test_search: !new:speechbrain.decoders.S2STransformerBeamSearcher diff --git a/recipes/LibriSpeech/ASR/transformer/hparams/conformer_small.yaml b/recipes/LibriSpeech/ASR/transformer/hparams/conformer_small.yaml index 25655271e8..32d075d89b 100644 --- a/recipes/LibriSpeech/ASR/transformer/hparams/conformer_small.yaml +++ b/recipes/LibriSpeech/ASR/transformer/hparams/conformer_small.yaml @@ -230,7 +230,7 @@ valid_search: !new:speechbrain.decoders.S2STransformerBeamSearcher max_decode_ratio: !ref beam_size: !ref using_eos_threshold: False - length_normalization: False + length_normalization: True test_search: !new:speechbrain.decoders.S2STransformerBeamSearcher modules: [!ref , !ref ] diff --git a/recipes/LibriSpeech/ASR/transformer/hparams/hyperbranchformer_13M.yaml b/recipes/LibriSpeech/ASR/transformer/hparams/hyperbranchformer_13M.yaml index 59081a6e74..5d003d7b40 100644 --- a/recipes/LibriSpeech/ASR/transformer/hparams/hyperbranchformer_13M.yaml +++ b/recipes/LibriSpeech/ASR/transformer/hparams/hyperbranchformer_13M.yaml @@ -234,7 +234,7 @@ valid_search: !new:speechbrain.decoders.S2STransformerBeamSearcher max_decode_ratio: !ref beam_size: !ref using_eos_threshold: False - length_normalization: False + length_normalization: True scorer: !ref test_search: !new:speechbrain.decoders.S2STransformerBeamSearcher diff --git a/recipes/LibriSpeech/ASR/transformer/hparams/hyperbranchformer_25M.yaml b/recipes/LibriSpeech/ASR/transformer/hparams/hyperbranchformer_25M.yaml index 2728604d7b..5e1014a959 100644 --- a/recipes/LibriSpeech/ASR/transformer/hparams/hyperbranchformer_25M.yaml +++ b/recipes/LibriSpeech/ASR/transformer/hparams/hyperbranchformer_25M.yaml @@ -235,7 +235,7 @@ valid_search: !new:speechbrain.decoders.S2STransformerBeamSearcher max_decode_ratio: !ref beam_size: !ref using_eos_threshold: False - length_normalization: False + length_normalization: True scorer: !ref test_search: !new:speechbrain.decoders.S2STransformerBeamSearcher diff --git a/recipes/LibriSpeech/ASR/transformer/hparams/hyperconformer_22M.yaml b/recipes/LibriSpeech/ASR/transformer/hparams/hyperconformer_22M.yaml index b8a73b7f1f..96d1acfbb8 100644 --- a/recipes/LibriSpeech/ASR/transformer/hparams/hyperconformer_22M.yaml +++ b/recipes/LibriSpeech/ASR/transformer/hparams/hyperconformer_22M.yaml @@ -231,7 +231,7 @@ valid_search: !new:speechbrain.decoders.S2STransformerBeamSearcher max_decode_ratio: !ref beam_size: !ref using_eos_threshold: False - length_normalization: False + length_normalization: True scorer: !ref test_search: !new:speechbrain.decoders.S2STransformerBeamSearcher diff --git a/recipes/LibriSpeech/ASR/transformer/hparams/hyperconformer_8M.yaml b/recipes/LibriSpeech/ASR/transformer/hparams/hyperconformer_8M.yaml index 75086765d5..2bb447ced2 100644 --- a/recipes/LibriSpeech/ASR/transformer/hparams/hyperconformer_8M.yaml +++ b/recipes/LibriSpeech/ASR/transformer/hparams/hyperconformer_8M.yaml @@ -232,7 +232,7 @@ valid_search: !new:speechbrain.decoders.S2STransformerBeamSearcher max_decode_ratio: !ref beam_size: !ref using_eos_threshold: False - length_normalization: False + length_normalization: True scorer: !ref test_search: !new:speechbrain.decoders.S2STransformerBeamSearcher diff --git a/recipes/LibriSpeech/ASR/transformer/hparams/transformer.yaml b/recipes/LibriSpeech/ASR/transformer/hparams/transformer.yaml index fc3f009ffb..38e836d9a4 100644 --- a/recipes/LibriSpeech/ASR/transformer/hparams/transformer.yaml +++ b/recipes/LibriSpeech/ASR/transformer/hparams/transformer.yaml @@ -238,7 +238,7 @@ valid_search: !new:speechbrain.decoders.S2STransformerBeamSearcher max_decode_ratio: !ref beam_size: !ref using_eos_threshold: False - length_normalization: False + length_normalization: True scorer: !ref test_search: !new:speechbrain.decoders.S2STransformerBeamSearcher diff --git a/recipes/LibriSpeech/G2P/hparams/hparams_g2p_transformer.yaml b/recipes/LibriSpeech/G2P/hparams/hparams_g2p_transformer.yaml index 1169ab8c0c..c75cd97bfb 100644 --- a/recipes/LibriSpeech/G2P/hparams/hparams_g2p_transformer.yaml +++ b/recipes/LibriSpeech/G2P/hparams/hparams_g2p_transformer.yaml @@ -402,7 +402,7 @@ beam_searcher: !new:speechbrain.decoders.S2STransformerBeamSearcher beam_size: !ref eos_threshold: !ref using_max_attn_shift: False - length_normalization: False + length_normalization: True max_attn_shift: !ref temperature: !ref scorer: !ref @@ -416,7 +416,7 @@ beam_searcher_lm: !new:speechbrain.decoders.S2STransformerBeamSearcher beam_size: !ref eos_threshold: !ref using_max_attn_shift: False - length_normalization: False + length_normalization: True max_attn_shift: !ref temperature: !ref scorer: !ref @@ -430,7 +430,7 @@ beam_searcher_valid: !new:speechbrain.decoders.S2STransformerBeamSearcher beam_size: !ref eos_threshold: !ref using_max_attn_shift: False - length_normalization: False + length_normalization: True max_attn_shift: !ref temperature: !ref scorer: !ref diff --git a/recipes/Switchboard/ASR/transformer/hparams/transformer.yaml b/recipes/Switchboard/ASR/transformer/hparams/transformer.yaml index 2b1bd3b42e..6be77ca8b6 100644 --- a/recipes/Switchboard/ASR/transformer/hparams/transformer.yaml +++ b/recipes/Switchboard/ASR/transformer/hparams/transformer.yaml @@ -218,7 +218,7 @@ valid_search: !new:speechbrain.decoders.S2STransformerBeamSearcher max_decode_ratio: !ref beam_size: !ref using_eos_threshold: !ref - length_normalization: False + length_normalization: !ref using_max_attn_shift: !ref max_attn_shift: !ref scorer: !ref diff --git a/recipes/Switchboard/ASR/transformer/hparams/transformer_finetuned_LM.yaml b/recipes/Switchboard/ASR/transformer/hparams/transformer_finetuned_LM.yaml index 03630c91b8..9a1ca75620 100644 --- a/recipes/Switchboard/ASR/transformer/hparams/transformer_finetuned_LM.yaml +++ b/recipes/Switchboard/ASR/transformer/hparams/transformer_finetuned_LM.yaml @@ -212,7 +212,7 @@ valid_search: !new:speechbrain.decoders.S2STransformerBeamSearcher max_decode_ratio: !ref beam_size: !ref using_eos_threshold: False - length_normalization: False + length_normalization: True scorer: !ref test_search: !new:speechbrain.decoders.S2STransformerBeamSearcher diff --git a/recipes/Tedlium2/ASR/transformer/hparams/branchformer_large.yaml b/recipes/Tedlium2/ASR/transformer/hparams/branchformer_large.yaml index 1fe8c26ee2..7ba96ebbd5 100644 --- a/recipes/Tedlium2/ASR/transformer/hparams/branchformer_large.yaml +++ b/recipes/Tedlium2/ASR/transformer/hparams/branchformer_large.yaml @@ -181,7 +181,7 @@ valid_search: !new:speechbrain.decoders.S2STransformerBeamSearch beam_size: !ref ctc_weight: !ref using_eos_threshold: False - length_normalization: False + length_normalization: True test_search: !new:speechbrain.decoders.S2STransformerBeamSearch