mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-09 01:52:41 +00:00
potential fix to k2SSL hubert_ce encoder forward function
This commit is contained in:
parent
db9fb8ad31
commit
90fb9207ba
@ -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))
|
x, x_lens = self.encoder(x, (~padding_mask).sum(dim=-1) if padding_mask else None)
|
||||||
x = x.transpose(0, 1)
|
x = x.transpose(0, 1)
|
||||||
|
|
||||||
if features_only:
|
if features_only:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user