Mercurial > pylearn
diff dataset.py @ 159:28a988bd19c3
bugfix: make the iterator advance
author | Frederic Bastien <bastienf@iro.umontreal.ca> |
---|---|
date | Mon, 12 May 2008 16:51:54 -0400 |
parents | f8a1ae7eb83e |
children | d7d67651d67c |
line wrap: on
line diff
--- a/dataset.py Mon May 12 16:24:59 2008 -0400 +++ b/dataset.py Mon May 12 16:51:54 2008 -0400 @@ -1079,6 +1079,7 @@ self.dataset.cached_examples.append(example) all_fields_minibatch = Example(self.dataset.fieldNames(), zip(*self.dataset.cached_examples[self.current:self.current+minibatch_size])) + self.current+=1 if self.dataset.fieldNames()==fieldnames: return all_fields_minibatch return Example(fieldnames,[all_fields_minibatch[name] for name in fieldnames])