mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-09-06 23:54:17 +00:00
minor fix
This commit is contained in:
parent
61ecd3764d
commit
6a7b69168c
@ -480,6 +480,7 @@ def main():
|
|||||||
|
|
||||||
# <blk> is defined in local/train_bpe_model.py
|
# <blk> is defined in local/train_bpe_model.py
|
||||||
params.blank_id = sp.piece_to_id("<blk>")
|
params.blank_id = sp.piece_to_id("<blk>")
|
||||||
|
params.unk_id = sp.piece_to_id("<unk>")
|
||||||
params.vocab_size = sp.get_piece_size()
|
params.vocab_size = sp.get_piece_size()
|
||||||
|
|
||||||
logging.info(params)
|
logging.info(params)
|
||||||
|
@ -729,7 +729,7 @@ class EmformerLayer(nn.Module):
|
|||||||
lengths: torch.Tensor,
|
lengths: torch.Tensor,
|
||||||
memory: torch.Tensor,
|
memory: torch.Tensor,
|
||||||
pos_emb: torch.Tensor,
|
pos_emb: torch.Tensor,
|
||||||
attention_mask: Optional[torch.Tensor],
|
attention_mask: Optional[torch.Tensor] = None,
|
||||||
) -> Tuple[torch.Tensor, torch.Tensor]:
|
) -> Tuple[torch.Tensor, torch.Tensor]:
|
||||||
"""Apply attention module in non-infer mode."""
|
"""Apply attention module in non-infer mode."""
|
||||||
if attention_mask is None:
|
if attention_mask is None:
|
||||||
@ -897,8 +897,8 @@ class EmformerLayer(nn.Module):
|
|||||||
right_context_end_idx,
|
right_context_end_idx,
|
||||||
lengths,
|
lengths,
|
||||||
memory,
|
memory,
|
||||||
attention_mask,
|
|
||||||
pos_emb,
|
pos_emb,
|
||||||
|
attention_mask,
|
||||||
)
|
)
|
||||||
|
|
||||||
right_context_utterance = self._apply_conv_module_forward(
|
right_context_utterance = self._apply_conv_module_forward(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user