Mercurial > pylearn
diff dataset.py @ 333:7d2f7b8fe213
bugfix in RenamedDataSet
author | Frederic Bastien <bastienf@iro.umontreal.ca> |
---|---|
date | Mon, 16 Jun 2008 17:07:41 -0400 |
parents | dada08a6adb8 |
children | 0ce6e62ac6e5 |
line wrap: on
line diff
--- a/dataset.py Mon Jun 16 16:44:11 2008 -0400 +++ b/dataset.py Mon Jun 16 17:07:41 2008 -0400 @@ -719,7 +719,12 @@ assert self.hasFields(*fieldnames) return self.src.minibatches_nowrap(fieldnames,minibatch_size,n_batches,offset) def __getitem__(self,i): - return FieldsSubsetDataSet(self.src[i],self.new_fieldnames) +# return FieldsSubsetDataSet(self.src[i],self.new_fieldnames) + complete_example = self.src[i] + return Example(self.new_fieldnames, + [complete_example[field] + for field in self.src_fieldnames]) + class DataSetFields(Example):