Mercurial > pylearn
changeset 344:a22ea54a19ed
bugfix, MinibatchDataSet.minibatches_nowrap() must raise StopIteration when needed
author | Frederic Bastien <bastienf@iro.umontreal.ca> |
---|---|
date | Tue, 17 Jun 2008 14:46:10 -0400 |
parents | 394b4e849c1b |
children | 3aa9e5a5802a |
files | dataset.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/dataset.py Tue Jun 17 14:45:22 2008 -0400 +++ b/dataset.py Tue Jun 17 14:46:10 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])