# HG changeset patch # User Frederic Bastien # Date 1210871060 14400 # Node ID ac61f1178f88cb195a50b41f2285fa6bc05f9aee # Parent 1400fa04dfab224afdde340fc7e994e393024838 bugfix? diff -r 1400fa04dfab -r ac61f1178f88 dataset.py --- a/dataset.py Tue May 13 16:42:51 2008 -0400 +++ b/dataset.py Thu May 15 13:04:20 2008 -0400 @@ -1177,12 +1177,13 @@ self.input_iterator=output_dataset.input_dataset.__iter__() def __iter__(self): return self def next(self): - function_inputs = self.input_iterator.next() if self.output_dataset.minibatch_mode: + function_inputs = [[input] for input in self.input_iterator.next()] outputs = self.output_dataset.function(*function_inputs) assert all([hasattr(output,'__iter__') for output in outputs]) function_outputs = [output[0] for output in outputs] else: + function_inputs = self.input_iterator.next() function_outputs = self.output_dataset.function(*function_inputs) return Example(self.output_dataset.output_names,function_outputs) return ApplyFunctionSingleExampleIterator(self)