Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Set beam search length penalty to 1.0 by default #206

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nmt/nmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def add_arguments(parser):
beam width when using beam search decoder. If 0 (default), use standard
decoder with greedy helper.\
"""))
parser.add_argument("--length_penalty_weight", type=float, default=0.0,
parser.add_argument("--length_penalty_weight", type=float, default=1.0,
help="Length penalty for beam search.")
parser.add_argument("--num_translations_per_input", type=int, default=1,
help=("""\
Expand Down