[mlpack] 27/44: Backport r17446, the most recent fix. Phew. I'm done with this backporting process (...for now). Hooray!
Barak A. Pearlmutter
barak+git at pearlmutter.net
Mon Feb 15 19:35:54 UTC 2016
This is an automated email from the git hooks/post-receive script.
bap pushed a commit to tag mlpack-1.0.11
in repository mlpack.
commit e34ce2e77226cff5764984e096cbf1bc836fe01f
Author: Ryan Curtin <ryan at ratml.org>
Date: Sun Dec 7 19:48:53 2014 +0000
Backport r17446, the most recent fix. Phew. I'm done with this backporting process (...for now). Hooray!
---
src/mlpack/methods/sparse_coding/sparse_coding_impl.hpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/mlpack/methods/sparse_coding/sparse_coding_impl.hpp b/src/mlpack/methods/sparse_coding/sparse_coding_impl.hpp
index 6ec6fda..f678796 100644
--- a/src/mlpack/methods/sparse_coding/sparse_coding_impl.hpp
+++ b/src/mlpack/methods/sparse_coding/sparse_coding_impl.hpp
@@ -224,7 +224,7 @@ double SparseCoding<DictionaryInitializer>::OptimizeDictionary(
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 @@ double SparseCoding<DictionaryInitializer>::OptimizeDictionary(
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);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git
More information about the debian-science-commits
mailing list