# HG changeset patch # User James Bergstra # Date 1282233690 14400 # Node ID 5cbd235f8fb8656e134f35f7796aea4300b08912 # Parent 2668812a6c86a8f1f73d97c7e269ae1546eb38f4 added doc to dataset_ops protocol diff -r 2668812a6c86 -r 5cbd235f8fb8 pylearn/dataset_ops/protocol.py --- 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