Mercurial > pylearn
diff dataset.py @ 163:d7d67651d67c
bugfix, we should advence by the minibatch size.
author | Frederic Bastien <bastienf@iro.umontreal.ca> |
---|---|
date | Mon, 12 May 2008 17:40:06 -0400 |
parents | 28a988bd19c3 |
children | ee11ed427ba8 |
line wrap: on
line diff
--- a/dataset.py Mon May 12 17:37:36 2008 -0400 +++ b/dataset.py Mon May 12 17:40:06 2008 -0400 @@ -1079,7 +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 + self.current+=minibatch_size if self.dataset.fieldNames()==fieldnames: return all_fields_minibatch return Example(fieldnames,[all_fields_minibatch[name] for name in fieldnames])