diff options
author | Paul Baltescu <pauldb89@gmail.com> | 2013-11-23 17:33:47 +0000 |
---|---|---|
committer | Paul Baltescu <pauldb89@gmail.com> | 2013-11-23 17:33:47 +0000 |
commit | 072c4bb1edde483b87b93bc6f4eec36fc8a21008 (patch) | |
tree | 6ceaa6ae1e08df9e523282740b14f4857236297c /training/utils/optimize_test.cc | |
parent | 7e90b8ea10904f9b83f4e77e14c7396a3e6f7d5d (diff) | |
parent | 9e80389b9763aa4f7f626ec71b561ccf6948d3ad (diff) |
Merge branch 'master' of https://github.com/redpony/cdec
Diffstat (limited to 'training/utils/optimize_test.cc')
-rw-r--r-- | training/utils/optimize_test.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/training/utils/optimize_test.cc b/training/utils/optimize_test.cc index bff2ca03..72fcef6d 100644 --- a/training/utils/optimize_test.cc +++ b/training/utils/optimize_test.cc @@ -2,6 +2,7 @@ #include <iostream> #include <sstream> #include <boost/program_options/variables_map.hpp> +#include <boost/shared_ptr.hpp> #include "optimize.h" #include "online_optimizer.h" #include "sparse_vector.h" @@ -96,14 +97,11 @@ void TestOptimizerVariants(int num_vars) { cerr << oa.Name() << " SUCCESS\n"; } -using namespace std::tr1; - void TestOnline() { size_t N = 20; double C = 1.0; double eta0 = 0.2; - std::tr1::shared_ptr<LearningRateSchedule> r(new ExponentialDecayLearningRate(N, eta0, 0.85)); - //shared_ptr<LearningRateSchedule> r(new StandardLearningRate(N, eta0)); + boost::shared_ptr<LearningRateSchedule> r(new ExponentialDecayLearningRate(N, eta0, 0.85)); CumulativeL1OnlineOptimizer opt(r, N, C, std::vector<int>()); assert(r->eta(10) < r->eta(1)); } |