diff --git a/egs/librispeech/ASR/pruned_transducer_stateless7/zipformer.py b/egs/librispeech/ASR/pruned_transducer_stateless7/zipformer.py index 65c2ffb0d..a122a112f 100644 --- a/egs/librispeech/ASR/pruned_transducer_stateless7/zipformer.py +++ b/egs/librispeech/ASR/pruned_transducer_stateless7/zipformer.py @@ -1403,6 +1403,13 @@ class AttentionSqueeze(nn.Module): prob=_aux_grad_prob_out(), bias=False, initial_scale=0.05) + self.out_balancer = ActivationBalancer( + channels, channel_dim=-1, + min_positive=0.4, max_positive=0.5, + min_abs=ScheduledFloat((0.0, 0.002), (8000.0, 0.02), (20000.0, 0.01)), + ) + + def forward(self, x: Tensor, attn_weights: Tensor):