comparison datasets/defs.py @ 377:0b7e64e8e93f

branch merge
author Arnaud Bergeron <abergeron@gmail.com>
date Sun, 25 Apr 2010 17:12:03 -0400
parents 22efb4968054
children
comparison
equal deleted inserted replaced
376:01445a75c702 377:0b7e64e8e93f
1 __all__ = ['nist_digits', 'nist_lower', 'nist_upper', 'nist_all', 'ocr', 1 __all__ = ['nist_digits', 'nist_lower', 'nist_upper', 'nist_all', 'ocr',
2 'nist_P07', 'mnist'] 2 'nist_P07', 'PNIST07', 'mnist']
3 3
4 from ftfile import FTDataSet 4 from ftfile import FTDataSet
5 from gzpklfile import GzpklDataSet 5 from gzpklfile import GzpklDataSet
6 import theano 6 import theano
7 import os 7 import os
50 test_data = [os.path.join(DATA_PATH,'data/P07_test_data.ft')], 50 test_data = [os.path.join(DATA_PATH,'data/P07_test_data.ft')],
51 test_lbl = [os.path.join(DATA_PATH,'data/P07_test_labels.ft')], 51 test_lbl = [os.path.join(DATA_PATH,'data/P07_test_labels.ft')],
52 valid_data = [os.path.join(DATA_PATH,'data/P07_valid_data.ft')], 52 valid_data = [os.path.join(DATA_PATH,'data/P07_valid_data.ft')],
53 valid_lbl = [os.path.join(DATA_PATH,'data/P07_valid_labels.ft')], 53 valid_lbl = [os.path.join(DATA_PATH,'data/P07_valid_labels.ft')],
54 indtype=theano.config.floatX, inscale=255., maxsize=maxsize) 54 indtype=theano.config.floatX, inscale=255., maxsize=maxsize)
55
56 #Added PNIST07
57 PNIST07 = lambda maxsize=None, min_file=0, max_file=100: FTDataSet(train_data = [os.path.join(DATA_PATH,'data/PNIST07_train'+str(i)+'_data.ft') for i in range(min_file, max_file)],
58 train_lbl = [os.path.join(DATA_PATH,'data/PNIST07_train'+str(i)+'_labels.ft') for i in range(min_file, max_file)],
59 test_data = [os.path.join(DATA_PATH,'data/PNIST07_test_data.ft')],
60 test_lbl = [os.path.join(DATA_PATH,'data/PNIST07_test_labels.ft')],
61 valid_data = [os.path.join(DATA_PATH,'data/PNIST07_valid_data.ft')],
62 valid_lbl = [os.path.join(DATA_PATH,'data/PNIST07_valid_labels.ft')],
63 indtype=theano.config.floatX, inscale=255., maxsize=maxsize)
55 64
56 mnist = lambda maxsize=None: GzpklDataSet(os.path.join(DATA_PATH,'mnist.pkl.gz'), 65 mnist = lambda maxsize=None: GzpklDataSet(os.path.join(DATA_PATH,'mnist.pkl.gz'),
57 maxsize=maxsize) 66 maxsize=maxsize)