comparison datasets/dataset.py @ 187:c03692aa6158

Merge
author fsavard
date Mon, 01 Mar 2010 11:45:59 -0500
parents d6672a7daea5
children
comparison
equal deleted inserted replaced
186:d364a130b221 187:c03692aa6158
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