mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-26 10:16:14 +00:00
change condition order
This commit is contained in:
parent
d186216025
commit
27198a32ac
@ -1635,7 +1635,7 @@ class ActivationDropoutAndLinear(torch.nn.Module):
|
|||||||
self.dropout_shared_dim = dropout_shared_dim
|
self.dropout_shared_dim = dropout_shared_dim
|
||||||
|
|
||||||
def forward(self, x: Tensor):
|
def forward(self, x: Tensor):
|
||||||
if torch.jit.is_scripting() or torch.jit.is_tracing() or not self.training:
|
if not self.training or torch.jit.is_scripting() or torch.jit.is_tracing():
|
||||||
if self.activation == "SwooshL":
|
if self.activation == "SwooshL":
|
||||||
x = SwooshLForward(x)
|
x = SwooshLForward(x)
|
||||||
elif self.activation == "SwooshR":
|
elif self.activation == "SwooshR":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user