# HG changeset patch # User James Bergstra # Date 1258395583 18000 # Node ID b2821fce15deb7b9c94e305148be25515a5b8d41 # Parent fafe796ad5fff46a99dc42e9d28661a2b38d737e added comment to TensorFnDataset diff -r fafe796ad5ff -r b2821fce15de pylearn/dataset_ops/protocol.py --- 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: