changeset 957:5cbd235f8fb8

added doc to dataset_ops protocol
author James Bergstra <bergstrj@iro.umontreal.ca>
date Thu, 19 Aug 2010 12:01:30 -0400
parents 2668812a6c86
children a0a6cc21dc4f
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	Thu Aug 19 12:00:35 2010 -0400
+++ b/pylearn/dataset_ops/protocol.py	Thu Aug 19 12:01:30 2010 -0400
@@ -66,6 +66,12 @@
     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):
+        """
+        :type fn: callable or (callable, args) tuple [MUST BE PICKLABLE!]
+
+        :param fn: function that returns the dataset as a tensor. Leading index is the example
+        index, others are considered part of each example.
+        """
         super(TensorFnDataset, self).__init__(dtype, bcast, single_shape, batch_size)
         try:
             self.fn, self.fn_args = fn