Skip to content

Commit

Permalink
[paraformer] fix fintune (#2155)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mddct authored Nov 23, 2023
1 parent 3b977ae commit 69987c3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions wenet/paraformer/paraformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ def _sampler(self, encoder_out, encoder_out_mask, ys_pad, ys_pad_lens,
B, _ = ys_pad.size()

tgt_mask = make_non_pad_mask(ys_pad_lens)
# zero the ignore id
ys_pad = ys_pad * tgt_mask
ys_pad_embed = self.embed(ys_pad) # [B, T, L]
with torch.no_grad():
decoder_out, _, _ = self.decoder(encoder_out, encoder_out_mask,
Expand Down

0 comments on commit 69987c3

Please sign in to comment.