changeset 209:50a8302addaf

template statscollector
author Yoshua Bengio <bengioy@iro.umontreal.ca>
date Sat, 17 May 2008 00:01:26 -0400
parents bf320808919f
children ffd50efefb70
files learner.py statscollector.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/learner.py	Fri May 16 16:39:01 2008 -0400
+++ b/learner.py	Sat May 17 00:01:26 2008 -0400
@@ -1,6 +1,6 @@
 
 from exceptions import *
-
+from dataset import AttributesHolder
 
 class LearningAlgorithm(object):
     """
--- a/statscollector.py	Fri May 16 16:39:01 2008 -0400
+++ b/statscollector.py	Sat May 17 00:01:26 2008 -0400
@@ -77,7 +77,7 @@
         total_loss = regularizer+t.examplewise_sum(nll)
         avg_nll = t.examplewise_mean(nll)
         avg_class_error = t.examplewise_mean(class_error)
-        for name,val in locals(): val.name = name
+        for name,val in locals().items(): val.name = name
         return StatsCollector([regularizer],[nll,class_error],[total_loss,avg_nll,avg_class_error])