From fe9b2b6aa3afe2f7baa9e049693fb37610228b54 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Tue, 28 Jan 2014 15:49:05 -0500 Subject: useful debugging --- training/mira/kbest_cut_mira.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'training') diff --git a/training/mira/kbest_cut_mira.cc b/training/mira/kbest_cut_mira.cc index e0b6eecb..e075bed3 100644 --- a/training/mira/kbest_cut_mira.cc +++ b/training/mira/kbest_cut_mira.cc @@ -933,7 +933,8 @@ int main(int argc, char** argv) { //reload weights based on update dense_weights.clear(); lambdas.init_vector(&dense_weights); - ShowLargestFeatures(dense_weights); + if (dense_weights.size() < 500) + ShowLargestFeatures(dense_weights); dense_w_local = dense_weights; iter++; @@ -1000,7 +1001,7 @@ int main(int argc, char** argv) { if (!stream) { int node_id = rng->next() * 100000; cerr << " Writing weights to " << node_id << endl; - Weights::ShowLargestFeatures(dense_weights); + //Weights::ShowLargestFeatures(dense_weights); dots = 0; ostringstream os; os << weights_dir << "/weights.mira-pass" << (cur_pass < 10 ? "0" : "") << cur_pass << "." << node_id << ".gz"; -- cgit v1.2.3 From 305af6fa4f91838d8c9289345c2b124fa8a10c2e Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Tue, 28 Jan 2014 22:08:58 -0500 Subject: better mira defaults, new release 2014-01-28 --- configure.ac | 9 ++++++--- training/mira/mira.py | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'training') diff --git a/configure.ac b/configure.ac index e5d2dadb..6b128768 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_CONFIG_MACRO_DIR([m4]) -AC_INIT([cdec],[2014-01-20]) +AC_INIT([cdec],[2014-01-28]) AC_CONFIG_SRCDIR([decoder/cdec.cc]) AM_INIT_AUTOMAKE AC_CONFIG_HEADERS(config.h) @@ -8,8 +8,10 @@ AC_PROG_LEX case $LEX in :) AC_MSG_ERROR([No lex (Flex, lex, etc.) program found]);; esac +OLD_CXXFLAGS=$CXXFLAGS AC_PROG_CC AC_PROG_CXX +CXXFLAGS=$OLD_CXXFLAGS AX_CXX_COMPILE_STDCXX_11([],[mandatory]) AC_LANG_CPLUSPLUS AC_OPENMP @@ -186,8 +188,9 @@ AC_CHECK_HEADER(google/dense_hash_map, AC_PROG_INSTALL -CPPFLAGS="-DPIC -fPIC $CPPFLAGS -DHAVE_CONFIG_H -DKENLM_MAX_ORDER=6" -CXXFLAGS="$CXX11_SWITCH $CXXFLAGS" +CPPFLAGS="-DPIC $CPPFLAGS -DHAVE_CONFIG_H -DKENLM_MAX_ORDER=6" +CXXFLAGS="$CXX11_SWITCH $CXXFLAGS -fPIC -g -O3" +CFLAGS="$CFLAGS -fPIC -g -O3" if test "x$HAVE_CXX11" = "x0"; then CPPFLAGS="$CPPFLAGS -DHAVE_OLD_CPP" diff --git a/training/mira/mira.py b/training/mira/mira.py index c84a8cff..77f2f35f 100755 --- a/training/mira/mira.py +++ b/training/mira/mira.py @@ -119,12 +119,12 @@ def main(): parser.add_argument('--metric-scale', type=int, default=1, metavar='N', help='scale MT loss by this amount when computing' ' hope/fear candidates') - parser.add_argument('-k', '--kbest-size', type=int, default=250, metavar='N', + parser.add_argument('-k', '--kbest-size', type=int, default=500, metavar='N', help='size of k-best list to extract from forest') parser.add_argument('--update-size', type=int, metavar='N', help='size of k-best list to use for update. defaults to ' 'equal kbest-size (applies to optimizer 5)') - parser.add_argument('--step-size', type=float, default=0.01, + parser.add_argument('--step-size', type=float, default=0.001, help='controls aggresiveness of update') parser.add_argument('--hope', type=int, default=1, choices=range(1,3), help='how to select hope candidate. options: ' -- cgit v1.2.3