From 568a8cc0f49e04919ec70edde1a9bd91786f51ec Mon Sep 17 00:00:00 2001 From: phkoehn Date: Wed, 5 Oct 2011 10:29:01 +0000 Subject: fixed broken sparse feature training git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4298 1f5c12ca-751b-0410-a591-d2e778427230 --- scripts/training/mert-moses.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/training/mert-moses.pl b/scripts/training/mert-moses.pl index f7bb7b8b6..e8124918c 100755 --- a/scripts/training/mert-moses.pl +++ b/scripts/training/mert-moses.pl @@ -883,7 +883,7 @@ if (defined $allsorted){ safesystem ("\\rm -f $allsorted") or die; }; safesystem("\\cp -f $weights_in_file run$run.$weights_in_file") or die; safesystem("\\cp -f $mert_logfile run$run.$mert_logfile") or die; -create_config($___CONFIG_ORIG, "./moses.ini", $featlist, $run, $devbleu); +create_config($___CONFIG_ORIG, "./moses.ini", $featlist, $run, $devbleu, $sparse_weights_file); # just to be sure that we have the really last finished step marked open F, "> finished_step.txt" or die "Can't mark finished step"; @@ -963,9 +963,11 @@ sub run_decoder { $model_weights{$name} .= sprintf " %.6f", $vals[$i]; } my $decoder_config = join(" ", values %model_weights); + $decoder_config .= " -weight-file run$run.sparse-weights" if -e "run$run.sparse-weights"; print STDERR "DECODER_CFG = $decoder_config\n"; print "decoder_config = $decoder_config\n"; + # run the decoder my $decoder_cmd; my $lsamp_cmd = ""; -- cgit v1.2.3