mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-09-04 14:44:18 +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
|
||||
params.blank_id = sp.piece_to_id("<blk>")
|
||||
params.unk_id = sp.piece_to_id("<unk>")
|
||||
params.vocab_size = sp.get_piece_size()
|
||||
|
||||
logging.info(params)
|
||||
|
@ -729,7 +729,7 @@ class EmformerLayer(nn.Module):
|
||||
lengths: torch.Tensor,
|
||||
memory: torch.Tensor,
|
||||
pos_emb: torch.Tensor,
|
||||
attention_mask: Optional[torch.Tensor],
|
||||
attention_mask: Optional[torch.Tensor] = None,
|
||||
) -> Tuple[torch.Tensor, torch.Tensor]:
|
||||
"""Apply attention module in non-infer mode."""
|
||||
if attention_mask is None:
|
||||
@ -897,8 +897,8 @@ class EmformerLayer(nn.Module):
|
||||
right_context_end_idx,
|
||||
lengths,
|
||||
memory,
|
||||
attention_mask,
|
||||
pos_emb,
|
||||
attention_mask,
|
||||
)
|
||||
|
||||
right_context_utterance = self._apply_conv_module_forward(
|
||||
|
Loading…
x
Reference in New Issue
Block a user