sdpa bugfix

This commit is contained in:
游雁 2024-07-24 00:40:52 +08:00
parent b9bc982e4f
commit 609c0e7e0d

View File

@ -42,7 +42,7 @@ def sense_voice_encode_forward(
olens = None
if use_padmask and olens is not None:
padding_mask = (~make_pad_mask(olens)[:, None, :]).to(torch.bool).to(x.device)
padding_mask = (~make_pad_mask(olens)[:, :, None]).to(torch.bool).to(x.device)
else:
padding_mask = None