This commit is contained in:
jianyou 2025-04-01 14:27:00 +08:00
parent 90fb9207ba
commit b4c9e37c8e

View File

@ -429,7 +429,7 @@ class HubertModel(nn.Module):
# padding_mask: (B, T), bool # padding_mask: (B, T), bool
# mask_indices: (B, T), bool # mask_indices: (B, T), bool
x = x.transpose(0, 1) x = x.transpose(0, 1)
x, x_lens = self.encoder(x, (~padding_mask).sum(dim=-1) if padding_mask else None) x, x_lens = self.encoder(x, (~padding_mask).sum(dim=-1) if padding_mask is not None else None)
x = x.transpose(0, 1) x = x.transpose(0, 1)
if features_only: if features_only: