Skip to content

Commit

Permalink
Merge pull request #5055 from pyf98/fix-maxlen
Browse files Browse the repository at this point in the history
Fix the condition for maxlen warning in beam search
  • Loading branch information
mergify[bot] committed Mar 24, 2023
2 parents b579d70 + 7f4f0bd commit c4d7063
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion espnet/nets/beam_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def forward(
+ "".join([self.token_list[x] for x in best.yseq[1:-1]])
+ "\n"
)
if best.yseq[1:-1].shape[0] == x.shape[0]:
if best.yseq[1:-1].shape[0] == maxlen:
logging.warning(
"best hypo length: {} == max output length: {}".format(
best.yseq[1:-1].shape[0], maxlen
Expand Down

0 comments on commit c4d7063

Please sign in to comment.