Skip to content

Commit

Permalink
fix error in padding computing (#1607)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzasdf authored Apr 25, 2024
1 parent df36f93 commit 25cabb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion egs/librispeech/SSL/zipformer/hubert_ce.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def forward(
# padding_mask: (B, T), bool
# mask_indices: (B, T), bool
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)

if features_only:
Expand Down

0 comments on commit 25cabb7

Please sign in to comment.