# HG changeset patch # User Frederic Bastien # Date 1296668375 18000 # Node ID 68fdb895f53f5d1c111dcf948c5fa1b9ffa8674f # Parent e7844692e6e2217ced7176cbdbe95fbcedd2210e allow to load the ule labels. diff -r e7844692e6e2 -r 68fdb895f53f pylearn/datasets/utlc.py --- a/pylearn/datasets/utlc.py Wed Feb 02 11:20:34 2011 -0500 +++ b/pylearn/datasets/utlc.py Wed Feb 02 12:39:35 2011 -0500 @@ -119,6 +119,22 @@ else: return train, valid, test +def load_ndarray_label(name): + """ Load the train,valid,test data for the dataset `name` + and return it in ndarray format. + + This is only available for the toy dataset ule. + """ + assert name in ['ule'] + trname,vname,tename = [os.path.join(config.data_root(), + 'UTLC','filetensor', + name+'_'+subset+'.ft') + for subset in ['trainl','validl','testl']] + trainl = load_filetensor(trname) + validl = load_filetensor(vname) + testl = load_filetensor(tename) + return trainl, validl, testl + def load_filetensor(fname): f = None try: