Mercurial > pylearn
diff dataset.py @ 140:488ad6398b12
bugfix
author | Frederic Bastien <bastienf@iro.umontreal.ca> |
---|---|
date | Mon, 12 May 2008 14:13:19 -0400 |
parents | fa752c55aa09 |
children | f5f235bebee4 |
line wrap: on
line diff
--- a/dataset.py Mon May 12 14:11:57 2008 -0400 +++ b/dataset.py Mon May 12 14:13:19 2008 -0400 @@ -765,12 +765,16 @@ return self def next(self): # concatenate all the fields of the minibatches + l=LookupList() + for iter in self.iterators: + l.append_lookuplist(iter.next()) + return l return reduce(LookupList.__add__,[iterator.next() for iterator in self.iterators]) assert self.hasFields(*fieldnames) # find out which underlying datasets are necessary to service the required fields # and construct corresponding minibatch iterators - if fieldnames: + if fieldnames and fieldnames!=self.fieldNames(): datasets=set([]) fields_in_dataset=dict([(dataset,[]) for dataset in datasets]) for fieldname in fieldnames: