summaryrefslogtreecommitdiff
path: root/training/mr_optimize_reduce.cc
diff options
context:
space:
mode:
authorredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-29 00:36:09 +0000
committerredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-29 00:36:09 +0000
commit594cc714737708bb7c90c24a1ab1537b052f45ee (patch)
treec3dca78e6c28379736f4b663e5c94b9dc40975cf /training/mr_optimize_reduce.cc
parent016b376714976bbf19510e07797c9787f29daf60 (diff)
online optimizer
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@631 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'training/mr_optimize_reduce.cc')
-rw-r--r--training/mr_optimize_reduce.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/training/mr_optimize_reduce.cc b/training/mr_optimize_reduce.cc
index 42727ecb..b931991d 100644
--- a/training/mr_optimize_reduce.cc
+++ b/training/mr_optimize_reduce.cc
@@ -108,11 +108,9 @@ int main(int argc, char** argv) {
}
wm.InitVector(&means);
}
- shared_ptr<Optimizer> o;
+ shared_ptr<BatchOptimizer> o;
const string omethod = conf["optimization_method"].as<string>();
- if (omethod == "sgd")
- o.reset(new SGDOptimizer(conf["eta"].as<double>()));
- else if (omethod == "rprop")
+ if (omethod == "rprop")
o.reset(new RPropOptimizer(num_feats)); // TODO add configuration
else
o.reset(new LBFGSOptimizer(num_feats, conf["correction_buffers"].as<int>()));