[mlpack-git] master: Fix convergence criterion according to Nishant's suggestion. (0fa1b46)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 22:04:25 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40
>---------------------------------------------------------------
commit 0fa1b465bf356e7d8aa305e795fa4ee05eef6390
Author: Ryan Curtin <ryan at ratml.org>
Date: Wed Dec 3 01:59:28 2014 +0000
Fix convergence criterion according to Nishant's suggestion.
>---------------------------------------------------------------
0fa1b465bf356e7d8aa305e795fa4ee05eef6390
src/mlpack/methods/sparse_coding/sparse_coding_impl.hpp | 4 ++--
1 file changed, 2 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 7919c20..08ac5b7 100644
--- a/src/mlpack/methods/sparse_coding/sparse_coding_impl.hpp
+++ b/src/mlpack/methods/sparse_coding/sparse_coding_impl.hpp
@@ -255,7 +255,7 @@ double SparseCoding<DictionaryInitializer>::OptimizeDictionary(
<< "." << std::endl;
Log::Debug << " Improvement: " << std::scientific << improvement << ".\n";
- if (improvement < newtonTolerance)
+ if (normGradient < newtonTolerance)
converged = true;
}
@@ -292,7 +292,7 @@ double SparseCoding<DictionaryInitializer>::OptimizeDictionary(
}
}
}
- //printf("final reconstruction error: %e\n", norm(data - dictionary * codes, "fro"));
+
return normGradient;
}
More information about the mlpack-git
mailing list