diff dataset.py @ 146:8173e196e291

Trying to make CacheDataSet work
author Yoshua Bengio <bengioy@iro.umontreal.ca>
date Mon, 12 May 2008 15:50:28 -0400
parents ceae4de18981
children 39bb21348fdf
line wrap: on
line diff
--- a/dataset.py	Mon May 12 15:08:18 2008 -0400
+++ b/dataset.py	Mon May 12 15:50:28 2008 -0400
@@ -1050,7 +1050,8 @@
           # into memory at once, which may be too much
           # the work could possibly be done by minibatches
           # that are as large as possible but no more than what memory allows.
-          self.cached_examples = zip(*source_dataset.minibatches(minibatch_size=len(source_dataset)).__iter__().next())
+          fields_values = source_dataset.minibatches(minibatch_size=len(source_dataset)).__iter__().next()
+          self.cached_examples = zip(*fields_values)
       else:
           self.cached_examples = []