Mercurial > pylearn
changeset 159:28a988bd19c3
bugfix: make the iterator advance
author | Frederic Bastien <bastienf@iro.umontreal.ca> |
---|---|
date | Mon, 12 May 2008 16:51:54 -0400 |
parents | 90104343c665 |
children | a910141fbe5b |
files | dataset.py |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
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])