mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
from local
This commit is contained in:
parent
d90ec45e33
commit
e77b0077b3
Binary file not shown.
@ -249,7 +249,10 @@ class Transformer(nn.Module):
|
|||||||
"""
|
"""
|
||||||
x = self.encoder_output_layer(x)
|
x = self.encoder_output_layer(x)
|
||||||
x = x.permute(1, 0, 2) # (S, N, C) -> (N, S, C)
|
x = x.permute(1, 0, 2) # (S, N, C) -> (N, S, C)
|
||||||
x = nn.functional.log_softmax(x, dim=-1) # (N, S, C)
|
if log_prob:
|
||||||
|
x = nn.functional.log_softmax(x, dim=-1) # (N, S, C)
|
||||||
|
else:
|
||||||
|
x = nn.functional.softmax(x, dim=-1)
|
||||||
return x
|
return x
|
||||||
|
|
||||||
@torch.jit.export
|
@torch.jit.export
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user