diff dataset.py @ 347:3aa9e5a5802a

Automated merge with ssh://projects@lgcm.iro.umontreal.ca/hg/pylearn
author Frederic Bastien <bastienf@iro.umontreal.ca>
date Tue, 17 Jun 2008 14:46:15 -0400
parents a22ea54a19ed
children 7545207466d4
line wrap: on
line diff
--- a/dataset.py	Tue Jun 17 14:33:15 2008 -0400
+++ b/dataset.py	Tue Jun 17 14:46:15 2008 -0400
@@ -864,7 +864,8 @@
                 return self
             def next(self):
                 upper = self.next_example+minibatch_size
-                assert upper<=self.ds.length
+                if upper>self.ds.length:
+                    raise StopIteration
                 #minibatch = Example(self.ds._fields.keys(),
                 #                    [field[self.next_example:upper]
                 #                     for field in self.ds._fields])