Mercurial > ift6266
annotate datasets/defs.py @ 220:e172ef73cdc5
Ajouté un paquet de type/value checks à SeriesTables, et finalisé les docstrings. Ajouté 3-4 tests. Légers refactorings ici et là sans conséquences externes.
author | fsavard |
---|---|
date | Thu, 11 Mar 2010 10:48:54 -0500 |
parents | 476da2ba6a12 |
children | 4cfd0eb438af |
rev | line source |
---|---|
211
476da2ba6a12
Add nist_P07 datasets to the predefs.
Arnaud Bergeron <abergeron@gmail.com>
parents:
181
diff
changeset
|
1 __all__ = ['nist_digits', 'nist_lower', 'nist_upper', 'nist_all', 'ocr', |
476da2ba6a12
Add nist_P07 datasets to the predefs.
Arnaud Bergeron <abergeron@gmail.com>
parents:
181
diff
changeset
|
2 'nist_P07'] |
163
4b28d7382dbf
Add inital implementation of datasets.
Arnaud Bergeron <abergeron@gmail.com>
parents:
diff
changeset
|
3 |
4b28d7382dbf
Add inital implementation of datasets.
Arnaud Bergeron <abergeron@gmail.com>
parents:
diff
changeset
|
4 from ftfile import FTDataSet |
180
76bc047df5ee
Add dtype conversion and rescaling to the read path.
Arnaud Bergeron <abergeron@gmail.com>
parents:
175
diff
changeset
|
5 import theano |
163
4b28d7382dbf
Add inital implementation of datasets.
Arnaud Bergeron <abergeron@gmail.com>
parents:
diff
changeset
|
6 |
175
224321bf043a
Define the ocr dataset and use the existing split for nist.
Arnaud Bergeron <abergeron@gmail.com>
parents:
164
diff
changeset
|
7 NIST_PATH = '/data/lisa/data/nist/by_class/' |
224321bf043a
Define the ocr dataset and use the existing split for nist.
Arnaud Bergeron <abergeron@gmail.com>
parents:
164
diff
changeset
|
8 DATA_PATH = '/data/lisa/data/ift6266h10/' |
224321bf043a
Define the ocr dataset and use the existing split for nist.
Arnaud Bergeron <abergeron@gmail.com>
parents:
164
diff
changeset
|
9 |
224321bf043a
Define the ocr dataset and use the existing split for nist.
Arnaud Bergeron <abergeron@gmail.com>
parents:
164
diff
changeset
|
10 nist_digits = FTDataSet(train_data = [NIST_PATH+'digits/digits_train_data.ft'], |
224321bf043a
Define the ocr dataset and use the existing split for nist.
Arnaud Bergeron <abergeron@gmail.com>
parents:
164
diff
changeset
|
11 train_lbl = [NIST_PATH+'digits/digits_train_labels.ft'], |
224321bf043a
Define the ocr dataset and use the existing split for nist.
Arnaud Bergeron <abergeron@gmail.com>
parents:
164
diff
changeset
|
12 test_data = [NIST_PATH+'digits/digits_test_data.ft'], |
180
76bc047df5ee
Add dtype conversion and rescaling to the read path.
Arnaud Bergeron <abergeron@gmail.com>
parents:
175
diff
changeset
|
13 test_lbl = [NIST_PATH+'digits/digits_test_labels.ft'], |
76bc047df5ee
Add dtype conversion and rescaling to the read path.
Arnaud Bergeron <abergeron@gmail.com>
parents:
175
diff
changeset
|
14 indtype=theano.config.floatX, inscale=255.) |
175
224321bf043a
Define the ocr dataset and use the existing split for nist.
Arnaud Bergeron <abergeron@gmail.com>
parents:
164
diff
changeset
|
15 nist_lower = FTDataSet(train_data = [NIST_PATH+'lower/lower_train_data.ft'], |
224321bf043a
Define the ocr dataset and use the existing split for nist.
Arnaud Bergeron <abergeron@gmail.com>
parents:
164
diff
changeset
|
16 train_lbl = [NIST_PATH+'lower/lower_train_labels.ft'], |
224321bf043a
Define the ocr dataset and use the existing split for nist.
Arnaud Bergeron <abergeron@gmail.com>
parents:
164
diff
changeset
|
17 test_data = [NIST_PATH+'lower/lower_test_data.ft'], |
180
76bc047df5ee
Add dtype conversion and rescaling to the read path.
Arnaud Bergeron <abergeron@gmail.com>
parents:
175
diff
changeset
|
18 test_lbl = [NIST_PATH+'lower/lower_test_labels.ft'], |
76bc047df5ee
Add dtype conversion and rescaling to the read path.
Arnaud Bergeron <abergeron@gmail.com>
parents:
175
diff
changeset
|
19 indtype=theano.config.floatX, inscale=255.) |
175
224321bf043a
Define the ocr dataset and use the existing split for nist.
Arnaud Bergeron <abergeron@gmail.com>
parents:
164
diff
changeset
|
20 nist_upper = FTDataSet(train_data = [NIST_PATH+'upper/upper_train_data.ft'], |
224321bf043a
Define the ocr dataset and use the existing split for nist.
Arnaud Bergeron <abergeron@gmail.com>
parents:
164
diff
changeset
|
21 train_lbl = [NIST_PATH+'upper/upper_train_labels.ft'], |
224321bf043a
Define the ocr dataset and use the existing split for nist.
Arnaud Bergeron <abergeron@gmail.com>
parents:
164
diff
changeset
|
22 test_data = [NIST_PATH+'upper/upper_test_data.ft'], |
180
76bc047df5ee
Add dtype conversion and rescaling to the read path.
Arnaud Bergeron <abergeron@gmail.com>
parents:
175
diff
changeset
|
23 test_lbl = [NIST_PATH+'upper/upper_test_labels.ft'], |
76bc047df5ee
Add dtype conversion and rescaling to the read path.
Arnaud Bergeron <abergeron@gmail.com>
parents:
175
diff
changeset
|
24 indtype=theano.config.floatX, inscale=255.) |
163
4b28d7382dbf
Add inital implementation of datasets.
Arnaud Bergeron <abergeron@gmail.com>
parents:
diff
changeset
|
25 |
175
224321bf043a
Define the ocr dataset and use the existing split for nist.
Arnaud Bergeron <abergeron@gmail.com>
parents:
164
diff
changeset
|
26 nist_all = FTDataSet(train_data = [DATA_PATH+'train_data.ft'], |
224321bf043a
Define the ocr dataset and use the existing split for nist.
Arnaud Bergeron <abergeron@gmail.com>
parents:
164
diff
changeset
|
27 train_lbl = [DATA_PATH+'train_labels.ft'], |
224321bf043a
Define the ocr dataset and use the existing split for nist.
Arnaud Bergeron <abergeron@gmail.com>
parents:
164
diff
changeset
|
28 test_data = [DATA_PATH+'test_data.ft'], |
224321bf043a
Define the ocr dataset and use the existing split for nist.
Arnaud Bergeron <abergeron@gmail.com>
parents:
164
diff
changeset
|
29 test_lbl = [DATA_PATH+'test_labels.ft'], |
224321bf043a
Define the ocr dataset and use the existing split for nist.
Arnaud Bergeron <abergeron@gmail.com>
parents:
164
diff
changeset
|
30 valid_data = [DATA_PATH+'valid_data.ft'], |
180
76bc047df5ee
Add dtype conversion and rescaling to the read path.
Arnaud Bergeron <abergeron@gmail.com>
parents:
175
diff
changeset
|
31 valid_lbl = [DATA_PATH+'valid_labels.ft'], |
76bc047df5ee
Add dtype conversion and rescaling to the read path.
Arnaud Bergeron <abergeron@gmail.com>
parents:
175
diff
changeset
|
32 indtype=theano.config.floatX, inscale=255.) |
175
224321bf043a
Define the ocr dataset and use the existing split for nist.
Arnaud Bergeron <abergeron@gmail.com>
parents:
164
diff
changeset
|
33 |
224321bf043a
Define the ocr dataset and use the existing split for nist.
Arnaud Bergeron <abergeron@gmail.com>
parents:
164
diff
changeset
|
34 ocr = FTDataSet(train_data = [DATA_PATH+'ocr_train_data.ft'], |
224321bf043a
Define the ocr dataset and use the existing split for nist.
Arnaud Bergeron <abergeron@gmail.com>
parents:
164
diff
changeset
|
35 train_lbl = [DATA_PATH+'ocr_train_labels.ft'], |
224321bf043a
Define the ocr dataset and use the existing split for nist.
Arnaud Bergeron <abergeron@gmail.com>
parents:
164
diff
changeset
|
36 test_data = [DATA_PATH+'ocr_test_data.ft'], |
224321bf043a
Define the ocr dataset and use the existing split for nist.
Arnaud Bergeron <abergeron@gmail.com>
parents:
164
diff
changeset
|
37 test_lbl = [DATA_PATH+'ocr_test_labels.ft'], |
224321bf043a
Define the ocr dataset and use the existing split for nist.
Arnaud Bergeron <abergeron@gmail.com>
parents:
164
diff
changeset
|
38 valid_data = [DATA_PATH+'ocr_valid_data.ft'], |
211
476da2ba6a12
Add nist_P07 datasets to the predefs.
Arnaud Bergeron <abergeron@gmail.com>
parents:
181
diff
changeset
|
39 valid_lbl = [DATA_PATH+'ocr_valid_labels.ft'], |
476da2ba6a12
Add nist_P07 datasets to the predefs.
Arnaud Bergeron <abergeron@gmail.com>
parents:
181
diff
changeset
|
40 indtype=theano.config.floatX, inscale=255.) |
476da2ba6a12
Add nist_P07 datasets to the predefs.
Arnaud Bergeron <abergeron@gmail.com>
parents:
181
diff
changeset
|
41 |
476da2ba6a12
Add nist_P07 datasets to the predefs.
Arnaud Bergeron <abergeron@gmail.com>
parents:
181
diff
changeset
|
42 nist_P07 = FTDataSet(train_data = [DATA_PATH+'data/P07_train'+str(i)+'_data.ft' for i in range(100)], |
476da2ba6a12
Add nist_P07 datasets to the predefs.
Arnaud Bergeron <abergeron@gmail.com>
parents:
181
diff
changeset
|
43 train_lbl = [DATA_PATH+'data/P07_train'+str(i)+'_labels.ft' for i in range(100)], |
476da2ba6a12
Add nist_P07 datasets to the predefs.
Arnaud Bergeron <abergeron@gmail.com>
parents:
181
diff
changeset
|
44 test_data = [DATA_PATH+'data/P07_test_data.ft'], |
476da2ba6a12
Add nist_P07 datasets to the predefs.
Arnaud Bergeron <abergeron@gmail.com>
parents:
181
diff
changeset
|
45 test_lbl = [DATA_PATH+'data/P07_test_labels.ft'], |
476da2ba6a12
Add nist_P07 datasets to the predefs.
Arnaud Bergeron <abergeron@gmail.com>
parents:
181
diff
changeset
|
46 valid_data = [DATA_PATH+'data/P07_valid_data.ft'], |
476da2ba6a12
Add nist_P07 datasets to the predefs.
Arnaud Bergeron <abergeron@gmail.com>
parents:
181
diff
changeset
|
47 valid_lbl = [DATA_PATH+'data/P07_valid_labels.ft'], |
476da2ba6a12
Add nist_P07 datasets to the predefs.
Arnaud Bergeron <abergeron@gmail.com>
parents:
181
diff
changeset
|
48 indtype=theano.config.floatX, inscale=255.) |