Skip to content

Commit

Permalink
fix step number
Browse files Browse the repository at this point in the history
  • Loading branch information
vince62s committed Dec 18, 2023
1 parent 383ea06 commit 05132fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion onmt/translate/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ def _translate_batch_with_strategy(self, batch, decode_strategy, left_pad=True):
batch,
src_len=decode_strategy.src_len,
src_map=src_map,
step=step if step == 0 else step + max(src_len.tolist()),
step=step if step == 0 else step + max(src_len.tolist()) - 1,
batch_offset=decode_strategy.batch_offset,
)

Expand Down

0 comments on commit 05132fb

Please sign in to comment.