From ed84795b477003d52848f09f1520a9588c059bd4 Mon Sep 17 00:00:00 2001 From: Daniel Povey Date: Mon, 20 Sep 2021 13:39:25 +0800 Subject: [PATCH] Config changes, bug fix --- egs/librispeech/ASR/conformer_ctc_bn_2d/conformer.py | 2 +- egs/librispeech/ASR/conformer_ctc_bn_2d/train.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/egs/librispeech/ASR/conformer_ctc_bn_2d/conformer.py b/egs/librispeech/ASR/conformer_ctc_bn_2d/conformer.py index a6c5eed68..bdb9fcb01 100644 --- a/egs/librispeech/ASR/conformer_ctc_bn_2d/conformer.py +++ b/egs/librispeech/ASR/conformer_ctc_bn_2d/conformer.py @@ -945,7 +945,7 @@ class SampleAndPredict(nn.Module): if reverse_grad: tot_prob = reverse_gradient(tot_prob) - return tot_prob + return tot_prob class ConformerEncoderLayer(nn.Module): diff --git a/egs/librispeech/ASR/conformer_ctc_bn_2d/train.py b/egs/librispeech/ASR/conformer_ctc_bn_2d/train.py index bae94971e..2119add00 100755 --- a/egs/librispeech/ASR/conformer_ctc_bn_2d/train.py +++ b/egs/librispeech/ASR/conformer_ctc_bn_2d/train.py @@ -155,7 +155,7 @@ def get_params() -> AttributeDict: """ params = AttributeDict( { - "exp_dir": Path("conformer_ctc_bn/exp_gloam_5e-4_0.85_discrete8"), + "exp_dir": Path("conformer_ctc_bn_2d/exp_bidirectional_1"), "lang_dir": Path("data/lang_bpe"), "feature_dim": 80, "subsampling_factor": 4, # can't be changed @@ -171,8 +171,8 @@ def get_params() -> AttributeDict: "reduction": "sum", "use_double_scores": True, "accum_grad": 1, - "att_scale": 0.4, - "reverse_att_scale": 0.4, # ctc_scale == 1.0 - att_scale - reverse_att_scale + "att_scale": 0.7, + "reverse_att_scale": 0.01, # ctc_scale == 1.0 - att_scale - reverse_att_scale "attention_dim": 512, "nhead": 8, "num_trunk_encoder_layers": 12,