Mercurial > pylearn
comparison dataset.py @ 336:0ce6e62ac6e5
Automated merge with ssh://projects@lgcm.iro.umontreal.ca/hg/pylearn
author | Frederic Bastien <bastienf@iro.umontreal.ca> |
---|---|
date | Mon, 16 Jun 2008 17:07:44 -0400 |
parents | 89d88807e958 7d2f7b8fe213 |
children | 7d4792fc28ae |
comparison
equal
deleted
inserted
replaced
335:89d88807e958 | 336:0ce6e62ac6e5 |
---|---|
717 | 717 |
718 def minibatches_nowrap(self,fieldnames,minibatch_size,n_batches,offset): | 718 def minibatches_nowrap(self,fieldnames,minibatch_size,n_batches,offset): |
719 assert self.hasFields(*fieldnames) | 719 assert self.hasFields(*fieldnames) |
720 return self.src.minibatches_nowrap(fieldnames,minibatch_size,n_batches,offset) | 720 return self.src.minibatches_nowrap(fieldnames,minibatch_size,n_batches,offset) |
721 def __getitem__(self,i): | 721 def __getitem__(self,i): |
722 return FieldsSubsetDataSet(self.src[i],self.new_fieldnames) | 722 # return FieldsSubsetDataSet(self.src[i],self.new_fieldnames) |
723 complete_example = self.src[i] | |
724 return Example(self.new_fieldnames, | |
725 [complete_example[field] | |
726 for field in self.src_fieldnames]) | |
727 | |
723 | 728 |
724 | 729 |
725 class DataSetFields(Example): | 730 class DataSetFields(Example): |
726 """ | 731 """ |
727 Although a L{DataSet} iterates over examples (like rows of a matrix), an associated | 732 Although a L{DataSet} iterates over examples (like rows of a matrix), an associated |