diff options
author | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-29 00:36:09 +0000 |
---|---|---|
committer | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-29 00:36:09 +0000 |
commit | 1903cdb1edaf05d82d8782d446f1d2c39eb05f0c (patch) | |
tree | 0873c3ce979b6ef5476ce0ae735f434763ce97d1 /training/mr_optimize_reduce.cc | |
parent | fabdc7bc3cd5a83c2c74768bfc46146b4f3221b4 (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.cc | 6 |
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>())); |