From d2ed3dfc90fa05c63433c5cc7e627bb03de209cc Mon Sep 17 00:00:00 2001 From: Daniel Povey Date: Fri, 25 Mar 2022 20:35:11 +0800 Subject: [PATCH] Fix bug --- egs/librispeech/ASR/pruned_transducer_stateless2/train.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/egs/librispeech/ASR/pruned_transducer_stateless2/train.py b/egs/librispeech/ASR/pruned_transducer_stateless2/train.py index 35991f5e9..13ba99017 100755 --- a/egs/librispeech/ASR/pruned_transducer_stateless2/train.py +++ b/egs/librispeech/ASR/pruned_transducer_stateless2/train.py @@ -506,8 +506,8 @@ def compute_loss( # overwhelming the simple_loss and causing it to diverge, # in case it had not fully learned the alignment yet. pruned_loss_scale = (0.0 if warmup < 1.0 else - (0.1 if warmup > 1.0 and warmup < 2.0) else - 1.0) + (0.1 if warmup > 1.0 and warmup < 2.0 else + 1.0)) loss = (params.simple_loss_scale * simple_loss + pruned_loss_scale * pruned_loss)