comparison datasets/defs.py @ 180:76bc047df5ee

Add dtype conversion and rescaling to the read path.
author Arnaud Bergeron <abergeron@gmail.com>
date Sat, 27 Feb 2010 16:50:16 -0500
parents 224321bf043a
children f0f47b045cbf
comparison
equal deleted inserted replaced
179:defd388aba0c 180:76bc047df5ee
1 __all__ = ['nist_digits', 'nist_lower', 'nist_upper', 'nist_all'] 1 __all__ = ['nist_digits', 'nist_lower', 'nist_upper', 'nist_all']
2 2
3 from ftfile import FTDataSet 3 from ftfile import FTDataSet
4 import theano
4 5
5 NIST_PATH = '/data/lisa/data/nist/by_class/' 6 NIST_PATH = '/data/lisa/data/nist/by_class/'
6 DATA_PATH = '/data/lisa/data/ift6266h10/' 7 DATA_PATH = '/data/lisa/data/ift6266h10/'
7 8
8 nist_digits = FTDataSet(train_data = [NIST_PATH+'digits/digits_train_data.ft'], 9 nist_digits = FTDataSet(train_data = [NIST_PATH+'digits/digits_train_data.ft'],
9 train_lbl = [NIST_PATH+'digits/digits_train_labels.ft'], 10 train_lbl = [NIST_PATH+'digits/digits_train_labels.ft'],
10 test_data = [NIST_PATH+'digits/digits_test_data.ft'], 11 test_data = [NIST_PATH+'digits/digits_test_data.ft'],
11 test_lbl = [NIST_PATH+'digits/digits_test_labels.ft']) 12 test_lbl = [NIST_PATH+'digits/digits_test_labels.ft'],
13 indtype=theano.config.floatX, inscale=255.)
12 nist_lower = FTDataSet(train_data = [NIST_PATH+'lower/lower_train_data.ft'], 14 nist_lower = FTDataSet(train_data = [NIST_PATH+'lower/lower_train_data.ft'],
13 train_lbl = [NIST_PATH+'lower/lower_train_labels.ft'], 15 train_lbl = [NIST_PATH+'lower/lower_train_labels.ft'],
14 test_data = [NIST_PATH+'lower/lower_test_data.ft'], 16 test_data = [NIST_PATH+'lower/lower_test_data.ft'],
15 test_lbl = [NIST_PATH+'lower/lower_test_labels.ft']) 17 test_lbl = [NIST_PATH+'lower/lower_test_labels.ft'],
18 indtype=theano.config.floatX, inscale=255.)
16 nist_upper = FTDataSet(train_data = [NIST_PATH+'upper/upper_train_data.ft'], 19 nist_upper = FTDataSet(train_data = [NIST_PATH+'upper/upper_train_data.ft'],
17 train_lbl = [NIST_PATH+'upper/upper_train_labels.ft'], 20 train_lbl = [NIST_PATH+'upper/upper_train_labels.ft'],
18 test_data = [NIST_PATH+'upper/upper_test_data.ft'], 21 test_data = [NIST_PATH+'upper/upper_test_data.ft'],
19 test_lbl = [NIST_PATH+'upper/upper_test_labels.ft']) 22 test_lbl = [NIST_PATH+'upper/upper_test_labels.ft'],
20 23 indtype=theano.config.floatX, inscale=255.)
21
22 24
23 nist_all = FTDataSet(train_data = [DATA_PATH+'train_data.ft'], 25 nist_all = FTDataSet(train_data = [DATA_PATH+'train_data.ft'],
24 train_lbl = [DATA_PATH+'train_labels.ft'], 26 train_lbl = [DATA_PATH+'train_labels.ft'],
25 test_data = [DATA_PATH+'test_data.ft'], 27 test_data = [DATA_PATH+'test_data.ft'],
26 test_lbl = [DATA_PATH+'test_labels.ft'], 28 test_lbl = [DATA_PATH+'test_labels.ft'],
27 valid_data = [DATA_PATH+'valid_data.ft'], 29 valid_data = [DATA_PATH+'valid_data.ft'],
28 valid_lbl = [DATA_PATH+'valid_labels.ft']) 30 valid_lbl = [DATA_PATH+'valid_labels.ft'],
31 indtype=theano.config.floatX, inscale=255.)
29 32
30 ocr = FTDataSet(train_data = [DATA_PATH+'ocr_train_data.ft'], 33 ocr = FTDataSet(train_data = [DATA_PATH+'ocr_train_data.ft'],
31 train_lbl = [DATA_PATH+'ocr_train_labels.ft'], 34 train_lbl = [DATA_PATH+'ocr_train_labels.ft'],
32 test_data = [DATA_PATH+'ocr_test_data.ft'], 35 test_data = [DATA_PATH+'ocr_test_data.ft'],
33 test_lbl = [DATA_PATH+'ocr_test_labels.ft'], 36 test_lbl = [DATA_PATH+'ocr_test_labels.ft'],