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