comparison dataset.py @ 198:136f78559138

bugfix
author Frederic Bastien <bastienf@iro.umontreal.ca>
date Tue, 13 May 2008 16:02:32 -0400
parents 96d891448107
children 1400fa04dfab
comparison
equal deleted inserted replaced
197:96d891448107 198:136f78559138
1177 self.input_iterator=output_dataset.input_dataset.__iter__() 1177 self.input_iterator=output_dataset.input_dataset.__iter__()
1178 def __iter__(self): return self 1178 def __iter__(self): return self
1179 def next(self): 1179 def next(self):
1180 function_inputs = self.input_iterator.next() 1180 function_inputs = self.input_iterator.next()
1181 if self.output_dataset.minibatch_mode: 1181 if self.output_dataset.minibatch_mode:
1182 function_outputs = [output[0] for output in self.output_dataset.function(*function_inputs)] 1182 function_outputs = self.output_dataset.function(*function_inputs)
1183 else: 1183 else:
1184 function_outputs = self.output_dataset.function(function_inputs) 1184 function_outputs = self.output_dataset.function(function_inputs)
1185 return Example(self.output_dataset.output_names,function_outputs) 1185 return Example(self.output_dataset.output_names,function_outputs)
1186 return ApplyFunctionSingleExampleIterator(self) 1186 return ApplyFunctionSingleExampleIterator(self)
1187 1187