comparison datasets/dataset.py @ 176:d6672a7daea5

Update comments in the dataset definition (you can't pass 0 as minibatch size).
author Arnaud Bergeron <abergeron@gmail.com>
date Sat, 27 Feb 2010 14:10:14 -0500
parents 4b28d7382dbf
children
comparison
equal deleted inserted replaced
175:224321bf043a 176:d6672a7daea5
4 def test(self, batchsize, bufsize=None): 4 def test(self, batchsize, bufsize=None):
5 r""" 5 r"""
6 Returns an iterator over the test examples. 6 Returns an iterator over the test examples.
7 7
8 Parameters 8 Parameters
9 batchsize (int) -- the size of the minibatches, 0 means 9 batchsize (int) -- the size of the minibatches
10 return the whole set at once.
11 bufsize (int, optional) -- the size of the in-memory buffer, 10 bufsize (int, optional) -- the size of the in-memory buffer,
12 0 to disable. 11 0 to disable.
13 """ 12 """
14 return self._return_it(batchsize, bufsize, self._test) 13 return self._return_it(batchsize, bufsize, self._test)
15 14
16 def train(self, batchsize, bufsize=None): 15 def train(self, batchsize, bufsize=None):
17 r""" 16 r"""
18 Returns an iterator over the training examples. 17 Returns an iterator over the training examples.
19 18
20 Parameters 19 Parameters
21 batchsize (int) -- the size of the minibatches, 0 means 20 batchsize (int) -- the size of the minibatches
22 return the whole set at once.
23 bufsize (int, optional) -- the size of the in-memory buffer, 21 bufsize (int, optional) -- the size of the in-memory buffer,
24 0 to disable. 22 0 to disable.
25 """ 23 """
26 return self._return_it(batchsize, bufsize, self._train) 24 return self._return_it(batchsize, bufsize, self._train)
27 25
28 def valid(self, batchsize, bufsize=None): 26 def valid(self, batchsize, bufsize=None):
29 r""" 27 r"""
30 Returns an iterator over the validation examples. 28 Returns an iterator over the validation examples.
31 29
32 Parameters 30 Parameters
33 batchsize (int) -- the size of the minibatches, 0 means 31 batchsize (int) -- the size of the minibatches
34 return the whole set at once.
35 bufsize (int, optional) -- the size of the in-memory buffer, 32 bufsize (int, optional) -- the size of the in-memory buffer,
36 0 to disable. 33 0 to disable.
37 """ 34 """
38 return self._return_it(batchsize, bufsize, self._valid) 35 return self._return_it(batchsize, bufsize, self._valid)
39 36