From ea6af465fc29a9cf56df4c4f789448eb71270b5f Mon Sep 17 00:00:00 2001 From: Joost Bastings Date: Thu, 7 Dec 2017 11:39:36 +0100 Subject: [PATCH] Set beam search length penalty to 1.0 by default Beam search has been shown to work much (much) better with this. I suggest we use it by default to help new users. It is not part of the provided configs, either. --- nmt/nmt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nmt/nmt.py b/nmt/nmt.py index f3d5e4f22..7ee852260 100644 --- a/nmt/nmt.py +++ b/nmt/nmt.py @@ -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=("""\