[mlpack-svn] r17474 - in mlpack/tags/mlpack-1.0.11: . src/mlpack/methods/sparse_coding
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Sun Dec 7 14:48:54 EST 2014
Author: rcurtin
Date: Sun Dec 7 14:48:53 2014
New Revision: 17474
Log:
Backport r17446, the most recent fix. Phew. I'm done with this backporting
process (...for now). Hooray!
Modified:
mlpack/tags/mlpack-1.0.11/ (props changed)
mlpack/tags/mlpack-1.0.11/src/mlpack/methods/sparse_coding/sparse_coding_impl.hpp
Modified: mlpack/tags/mlpack-1.0.11/src/mlpack/methods/sparse_coding/sparse_coding_impl.hpp
==============================================================================
--- mlpack/tags/mlpack-1.0.11/src/mlpack/methods/sparse_coding/sparse_coding_impl.hpp (original)
+++ mlpack/tags/mlpack-1.0.11/src/mlpack/methods/sparse_coding/sparse_coding_impl.hpp Sun Dec 7 14:48:53 2014
@@ -224,7 +224,7 @@
double normGradient;
double improvement = 0;
- for (size_t t = 1; !converged; ++t)
+ for (size_t t = 1; (t != maxIterations) && !converged; ++t)
{
arma::mat A = codesZT + diagmat(dualVars);
@@ -244,7 +244,9 @@
const double rho = 0.9;
double sufficientDecrease = c * dot(gradient, searchDirection);
- for (size_t t = 1; t != maxIterations; ++t)
+ // A maxIterations parameter for the Armijo line search may be a good idea,
+ // but it doesn't seem to be causing any problems for now.
+ while (true)
{
// Calculate objective.
double sumDualVars = sum(dualVars);
More information about the mlpack-svn
mailing list