[mlpack] 44/44: Fix -Wuninitialized.
Barak A. Pearlmutter
barak+git at pearlmutter.net
Mon Feb 15 19:35:55 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 f4d80ec7d27fcbe7c00d241100c6d5ff6a40cd4a
Author: Ryan Curtin <ryan at ratml.org>
Date: Thu Dec 11 14:02:20 2014 +0000
Fix -Wuninitialized.
---
src/mlpack/methods/sparse_coding/sparse_coding_impl.hpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/mlpack/methods/sparse_coding/sparse_coding_impl.hpp b/src/mlpack/methods/sparse_coding/sparse_coding_impl.hpp
index ad9639f..212ed0b 100644
--- a/src/mlpack/methods/sparse_coding/sparse_coding_impl.hpp
+++ b/src/mlpack/methods/sparse_coding/sparse_coding_impl.hpp
@@ -222,7 +222,7 @@ double SparseCoding<DictionaryInitializer>::OptimizeDictionary(
codesZT = matActiveZ * trans(matActiveZ);
}
- double normGradient;
+ double normGradient = 0;
double improvement = 0;
for (size_t t = 1; (t != maxIterations) && !converged; ++t)
{
@@ -356,9 +356,9 @@ std::string SparseCoding<DictionaryInitializer>::ToString() const
convert << "Sparse Coding [" << this << "]" << std::endl;
convert << " Data: " << data.n_rows << "x" ;
convert << data.n_cols << std::endl;
- convert << " Atoms: " << atoms << std::endl;
- convert << " Lambda 1: " << lambda1 << std::endl;
- convert << " Lambda 2: " << lambda2 << std::endl;
+ convert << " Atoms: " << atoms << std::endl;
+ convert << " Lambda 1: " << lambda1 << std::endl;
+ convert << " Lambda 2: " << lambda2 << std::endl;
return convert.str();
}
--
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