Mercurial > ift6266
diff 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 |
line wrap: on
line diff
--- a/datasets/defs.py Sat Feb 27 16:07:09 2010 -0500 +++ b/datasets/defs.py Sat Feb 27 16:50:16 2010 -0500 @@ -1,6 +1,7 @@ __all__ = ['nist_digits', 'nist_lower', 'nist_upper', 'nist_all'] from ftfile import FTDataSet +import theano NIST_PATH = '/data/lisa/data/nist/by_class/' DATA_PATH = '/data/lisa/data/ift6266h10/' @@ -8,24 +9,26 @@ nist_digits = FTDataSet(train_data = [NIST_PATH+'digits/digits_train_data.ft'], train_lbl = [NIST_PATH+'digits/digits_train_labels.ft'], test_data = [NIST_PATH+'digits/digits_test_data.ft'], - test_lbl = [NIST_PATH+'digits/digits_test_labels.ft']) + test_lbl = [NIST_PATH+'digits/digits_test_labels.ft'], + indtype=theano.config.floatX, inscale=255.) nist_lower = FTDataSet(train_data = [NIST_PATH+'lower/lower_train_data.ft'], train_lbl = [NIST_PATH+'lower/lower_train_labels.ft'], test_data = [NIST_PATH+'lower/lower_test_data.ft'], - test_lbl = [NIST_PATH+'lower/lower_test_labels.ft']) + test_lbl = [NIST_PATH+'lower/lower_test_labels.ft'], + indtype=theano.config.floatX, inscale=255.) nist_upper = FTDataSet(train_data = [NIST_PATH+'upper/upper_train_data.ft'], train_lbl = [NIST_PATH+'upper/upper_train_labels.ft'], test_data = [NIST_PATH+'upper/upper_test_data.ft'], - test_lbl = [NIST_PATH+'upper/upper_test_labels.ft']) - - + test_lbl = [NIST_PATH+'upper/upper_test_labels.ft'], + indtype=theano.config.floatX, inscale=255.) nist_all = FTDataSet(train_data = [DATA_PATH+'train_data.ft'], train_lbl = [DATA_PATH+'train_labels.ft'], test_data = [DATA_PATH+'test_data.ft'], test_lbl = [DATA_PATH+'test_labels.ft'], valid_data = [DATA_PATH+'valid_data.ft'], - valid_lbl = [DATA_PATH+'valid_labels.ft']) + valid_lbl = [DATA_PATH+'valid_labels.ft'], + indtype=theano.config.floatX, inscale=255.) ocr = FTDataSet(train_data = [DATA_PATH+'ocr_train_data.ft'], train_lbl = [DATA_PATH+'ocr_train_labels.ft'],