mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-09 10:02:22 +00:00
fix error in padding computing (#1607)
This commit is contained in:
parent
df36f93bd8
commit
25cabb7663
@ -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))
|
||||||
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