From e4a22bbe9655bc3a68f223951eeece375eaa6cac Mon Sep 17 00:00:00 2001 From: Daniel Povey Date: Sun, 30 Oct 2022 14:43:02 +0800 Subject: [PATCH] Reduce initial clamp_min for bypass_scale from 1.0 to 0.5. --- egs/librispeech/ASR/pruned_transducer_stateless7/zipformer.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/egs/librispeech/ASR/pruned_transducer_stateless7/zipformer.py b/egs/librispeech/ASR/pruned_transducer_stateless7/zipformer.py index 2a4de2c48..d617181db 100644 --- a/egs/librispeech/ASR/pruned_transducer_stateless7/zipformer.py +++ b/egs/librispeech/ASR/pruned_transducer_stateless7/zipformer.py @@ -321,7 +321,7 @@ class ZipformerEncoderLayer(nn.Module): return self.bypass_scale # hardcode warmup period for bypass scale warmup_period = 4000.0 - initial_clamp_min = 1.0 + initial_clamp_min = 0.5 final_clamp_min = 0.2 if self.batch_count > warmup_period: clamp_min = final_clamp_min @@ -330,8 +330,6 @@ class ZipformerEncoderLayer(nn.Module): (self.batch_count / warmup_period) * (initial_clamp_min - final_clamp_min)) return self.bypass_scale.clamp(min=clamp_min, max=1.0) - - def forward( self, src: Tensor,