[mlpack] 130/149: Fix convergence criterion according to Nishant's suggestion.

Barak A. Pearlmutter barak+git at pearlmutter.net
Sat May 2 09:11:17 UTC 2015


This is an automated email from the git hooks/post-receive script.

bap pushed a commit to branch svn-trunk
in repository mlpack.

commit e541549ff7aab296a8903a498a1252ef0db23690
Author: rcurtin <rcurtin at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date:   Wed Dec 3 01:59:28 2014 +0000

    Fix convergence criterion according to Nishant's suggestion.
    
    
    git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@17432 9d5b8971-822b-0410-80eb-d18c1038ef23
---
 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;
 }
 

-- 
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