From 61717513d5b972e1d80bb143997af831859c1664 Mon Sep 17 00:00:00 2001 From: tqchen Date: Tue, 8 Apr 2014 15:09:04 -0700 Subject: [PATCH] final fix --- cxxnet/cxxnet_main.cpp | 4 ++-- example/MNIST/MNIST.conf | 6 +++--- example/MNIST/MNIST_CONV.conf | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cxxnet/cxxnet_main.cpp b/cxxnet/cxxnet_main.cpp index 44544b17..10a02afa 100644 --- a/cxxnet/cxxnet_main.cpp +++ b/cxxnet/cxxnet_main.cpp @@ -194,11 +194,11 @@ namespace cxxnet{ } if( !strcmp( name, "iter" ) && !strcmp( val, "end" ) ){ utils::Assert( flag != 0, "wrong configuration file" ); - if( flag == 1 ){ + if( flag == 1 && task != "pred" ){ utils::Assert( itr_train == NULL, "can only have one data" ); itr_train = cxxnet::CreateIterator( itcfg ); } - if( flag == 2 ){ + if( flag == 2 && task != "pred" ){ itr_evals.push_back( cxxnet::CreateIterator( itcfg ) ); eval_names.push_back( evname ); } diff --git a/example/MNIST/MNIST.conf b/example/MNIST/MNIST.conf index df495cc9..a02d97b4 100644 --- a/example/MNIST/MNIST.conf +++ b/example/MNIST/MNIST.conf @@ -36,9 +36,9 @@ num_round = 15 train_eval = 1 random_type = gaussian ## learning parameters -lr:eta = 0.1 -lr:momentum = 0.9 -lr:wd = 0.0 +eta = 0.1 +momentum = 0.9 +wd = 0.0 # evaluation metric metric = error # end of config diff --git a/example/MNIST/MNIST_CONV.conf b/example/MNIST/MNIST_CONV.conf index a10e9810..c4d47fd6 100644 --- a/example/MNIST/MNIST_CONV.conf +++ b/example/MNIST/MNIST_CONV.conf @@ -50,9 +50,9 @@ num_round = 15 train_eval = 1 random_type = gaussian ## learning parameters -lr:eta = 0.1 -lr:momentum = 0.9 -lr:wd = 0.0 +eta = 0.1 +momentum = 0.9 +wd = 0.0 # evaluation metric metric = error eval_train = 1