changeset 872:b2821fce15de

added comment to TensorFnDataset
author James Bergstra <bergstrj@iro.umontreal.ca>
date Mon, 16 Nov 2009 13:19:43 -0500
parents fafe796ad5ff
children 223caaea433a
files pylearn/dataset_ops/protocol.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pylearn/dataset_ops/protocol.py	Wed Nov 11 10:47:15 2009 -0500
+++ b/pylearn/dataset_ops/protocol.py	Mon Nov 16 13:19:43 2009 -0500
@@ -59,6 +59,12 @@
         super(TensorDataset, self).__init__(single_type, batch_type)
 
 class TensorFnDataset(TensorDataset):
+    """A good base class for TensorDatasets that can be read from disk and cached in memory
+
+    The dataset is accessed via a function call to make this Op pickle-able.  If the function
+    is a normal module-level function, then this Op will be picklable.  If the dataset were a
+    property of this Op, then pickling the Op would require pickling the entire dataset.
+    """
     def __init__(self, dtype, bcast, fn, single_shape=None, batch_size=None):
         super(TensorFnDataset, self).__init__(dtype, bcast, single_shape, batch_size)
         try: