Skip to content

Commit

Permalink
Fix issue with eval mode in ActivationDropoutLinear (#1770)
Browse files Browse the repository at this point in the history
* Fix issue with eval mode in ActivationDropoutLinear

---------

Co-authored-by: Daniel Povey <[email protected]>
  • Loading branch information
yaozengwei and danpovey authored Oct 12, 2024
1 parent d9844d8 commit fbba712
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion egs/librispeech/ASR/zipformer/scaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -1635,7 +1635,7 @@ def __init__(
self.dropout_shared_dim = dropout_shared_dim

def forward(self, x: Tensor):
if torch.jit.is_scripting() or torch.jit.is_tracing():
if not self.training or torch.jit.is_scripting() or torch.jit.is_tracing():
if self.activation == "SwooshL":
x = SwooshLForward(x)
elif self.activation == "SwooshR":
Expand Down

0 comments on commit fbba712

Please sign in to comment.