Mercurial > ift6266
comparison datasets/defs.py @ 349:22efb4968054
added pnist support, will check in code for data set iterator later
author | xaviermuller |
---|---|
date | Mon, 19 Apr 2010 10:12:17 -0400 |
parents | 4533350d7361 |
children |
comparison
equal
deleted
inserted
replaced
348:45156cbf6722 | 349:22efb4968054 |
---|---|
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) |