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
0f3696ed91
commit
89271fb9ea
Binary file not shown.
@ -490,9 +490,11 @@ class TransfEncoder(nn.TransformerEncoder):
|
||||
convert_to_nested = True
|
||||
output = torch._nested_tensor_from_mask(output, src_key_padding_mask.logical_not(), mask_check=False)
|
||||
src_key_padding_mask_for_layers = None
|
||||
|
||||
|
||||
outputs = []
|
||||
for mod in self.layers:
|
||||
output = mod(output, src_mask=mask, src_key_padding_mask=src_key_padding_mask_for_layers)
|
||||
outputs.append(output)
|
||||
|
||||
if convert_to_nested:
|
||||
output = output.to_padded_tensor(0.)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user