comparison dataset.py @ 337:5e38ed2b3a75

debugging when fieldnames = None, now -> fieldnames = fieldNames()
author Thierry Bertin-Mahieux <bertinmt@iro.umontreal.ca>
date Mon, 16 Jun 2008 17:17:01 -0400
parents 89d88807e958
children 7d4792fc28ae aa8aff6abbf7
comparison
equal deleted inserted replaced
335:89d88807e958 337:5e38ed2b3a75
386 """ 386 """
387 #return DataSet.MinibatchWrapAroundIterator(self,fieldnames,minibatch_size,n_batches,offset)\ 387 #return DataSet.MinibatchWrapAroundIterator(self,fieldnames,minibatch_size,n_batches,offset)\
388 assert offset >= 0 388 assert offset >= 0
389 assert offset < len(self) 389 assert offset < len(self)
390 assert offset + minibatch_size -1 < len(self) 390 assert offset + minibatch_size -1 < len(self)
391 if fieldnames == None :
392 fieldnames = self.fieldNames()
391 return self.minibatches_nowrap(fieldnames,minibatch_size,n_batches,offset) 393 return self.minibatches_nowrap(fieldnames,minibatch_size,n_batches,offset)
392 394
393 def minibatches_nowrap(self,fieldnames,minibatch_size,n_batches,offset): 395 def minibatches_nowrap(self,fieldnames,minibatch_size,n_batches,offset):
394 """ 396 """
395 This is the minibatches iterator generator that sub-classes must define. 397 This is the minibatches iterator generator that sub-classes must define.