changeset 980:62b65651f312

added __str__ to early Stopper
author James Bergstra <bergstrj@iro.umontreal.ca>
date Thu, 15 Apr 2010 10:08:57 -0400
parents 2a53384d9742
children 841dd63c76e0
files pylearn/shared/layers/sgd.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pylearn/shared/layers/sgd.py	Mon Aug 23 16:05:31 2010 -0400
+++ b/pylearn/shared/layers/sgd.py	Thu Apr 15 10:08:57 2010 -0400
@@ -137,3 +137,9 @@
                 or (self.iter < (self.halflife_iter * self.patience_factor))
         self.iter += 1
 
+    def __str__(self):
+        return ("Stopper{iter=%(iter)s,"
+        "promising=%(promising)s,best_iter=%(best_iter)s,best_value=%(best_value)s"
+        ",patience=%(patience_factor)s}")%self.__dict__
+
+