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
7a2448d887
commit
06dca57f4b
Binary file not shown.
@ -136,7 +136,7 @@ class Conformer(EncoderInterface):
|
|||||||
self._init_state: List[torch.Tensor] = [torch.empty(0)]
|
self._init_state: List[torch.Tensor] = [torch.empty(0)]
|
||||||
|
|
||||||
def forward(
|
def forward(
|
||||||
self, x: torch.Tensor, x_lens: torch.Tensor, warmup: float = 1.0
|
self, x: torch.Tensor, x_lens: torch.Tensor, warmup: float = 1.0, layer_output = False,
|
||||||
) -> Tuple[torch.Tensor, torch.Tensor]:
|
) -> Tuple[torch.Tensor, torch.Tensor]:
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
@ -198,7 +198,7 @@ class Conformer(EncoderInterface):
|
|||||||
x = x.permute(1, 0, 2) # (T, N, C) ->(N, T, C)
|
x = x.permute(1, 0, 2) # (T, N, C) ->(N, T, C)
|
||||||
layer_outputs = [x.permute(1, 0, 2) for x in layer_outputs]
|
layer_outputs = [x.permute(1, 0, 2) for x in layer_outputs]
|
||||||
|
|
||||||
return x, lengths, layer_outputs
|
return x, lengths
|
||||||
|
|
||||||
@torch.jit.export
|
@torch.jit.export
|
||||||
def get_init_state(
|
def get_init_state(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user