[mlpack-git] mlpack-1.0.x: Fix -Wuninitialized. (a83e51e)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Wed Jan 7 11:58:49 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : mlpack-1.0.x
Link : https://github.com/mlpack/mlpack/compare/0000000000000000000000000000000000000000...904762495c039e345beba14c1142fd719b3bd50e
>---------------------------------------------------------------
commit a83e51eb09a700992f561e2b4b717c7ed04417ee
Author: Ryan Curtin <ryan at ratml.org>
Date: Thu Dec 11 14:02:20 2014 +0000
Fix -Wuninitialized.
>---------------------------------------------------------------
a83e51eb09a700992f561e2b4b717c7ed04417ee
src/mlpack/methods/sparse_coding/sparse_coding_impl.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)
{
More information about the mlpack-git
mailing list