Fix padding issues

This commit is contained in:
wd929 2023-10-11 16:04:45 +08:00
parent 16a2748d6c
commit 5365e66d50
2 changed files with 2 additions and 2 deletions

View File

@ -158,7 +158,7 @@ class Conformer(EncoderInterface):
if not is_jit_tracing():
assert x.size(0) == lengths.max().item()
src_key_padding_mask = make_pad_mask(lengths)
src_key_padding_mask = make_pad_mask(lengths, x.size(0))
if self.dynamic_chunk_training:
assert (

View File

@ -281,7 +281,7 @@ class Zipformer(EncoderInterface):
lengths = (x_lens - 7) >> 1
assert x.size(0) == lengths.max().item(), (x.shape, lengths, lengths.max())
mask = make_pad_mask(lengths)
mask = make_pad_mask(lengths, x.size(0))
outputs = []
feature_masks = self.get_feature_masks(x)