[mlpack-svn] r17497 - 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
Thu Dec 11 09:02:21 EST 2014
Author: rcurtin
Date: Thu Dec 11 09:02:20 2014
New Revision: 17497
Log:
Fix -Wuninitialized.
Modified:
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 Thu Dec 11 09:02:20 2014
@@ -222,7 +222,7 @@
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 @@
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();
}
More information about the mlpack-svn
mailing list