mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
Bug fix RE masking
This commit is contained in:
parent
20e6d2a157
commit
cba194aa26
@ -1225,7 +1225,7 @@ class RelPositionMultiheadAttentionWeights(nn.Module):
|
||||
num_heads, batch_size, seq_len, seq_len
|
||||
)
|
||||
attn_scores = attn_scores.masked_fill(
|
||||
key_padding_mask.unsqueeze(-1),
|
||||
key_padding_mask.unsqueeze(1),
|
||||
float("-inf"),
|
||||
)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user