# HG changeset patch # User James Bergstra # Date 1284587163 14400 # Node ID f36f59e53c28ecd5bd74b0f670a24c06e0645d53 # Parent 5ae77ac21609e1ca713d8c96e4950fb0684b8cdd cifar10 op - made splits constructors a parameter diff -r 5ae77ac21609 -r f36f59e53c28 pylearn/dataset_ops/cifar10.py --- a/pylearn/dataset_ops/cifar10.py Wed Sep 15 17:45:04 2010 -0400 +++ b/pylearn/dataset_ops/cifar10.py Wed Sep 15 17:46:03 2010 -0400 @@ -58,7 +58,11 @@ return test_data_labels()[1] -def cifar10(s_idx, split, dtype='float64', rasterized=False, color='grey'): +def cifar10(s_idx, split, dtype='float64', rasterized=False, color='grey', + split_options = {'train':(train_data, train_labels), + 'valid': (valid_data, valid_labels), + 'test': (test_data, test_labels)} + ): """ Returns a pair (img, label) of theano expressions for cifar-10 samples @@ -76,10 +80,6 @@ """ - split_options = {'train':(train_data, train_labels), - 'valid': (valid_data, valid_labels), - 'test': (test_data, test_labels)} - if split not in split_options: raise ValueError('invalid split option', (split, split_options.keys()))