(load_train=True, load_dev=True, load_test=True, path='./')
return train, valid, test, worddict
Loads the dataset

    :type dataset: string
    :param dataset: the path to the dataset
Loads the dataset
Loads the dataset
def load_data(load_train=True, load_dev=True, load_test=True, path='./'):
    ''' Loads the dataset

    :type dataset: string
    :param dataset: the path to the dataset
    '''

    #############
    # LOAD DATA #
    #############
    print '... loading data'

    if load_train:
        with open(path+'flicker_8k_align.train.pkl', 'rb') as f:
            train_cap = pkl.load(f)
            train_feat = pkl.load(f)
        train = (train_cap, train_feat)
    else:
        train = None
    if load_test:
        with open(path+'flicker_8k_align.test.pkl', 'rb') as f:
            test_cap = pkl.load(f)
            test_feat = pkl.load(f)
        test = (test_cap, test_feat)
    else:
        test = None
    if load_dev:
        with open(path+'flicker_8k_align.dev.pkl', 'rb') as f:
            dev_cap = pkl.load(f)
            dev_feat = pkl.load(f)
        valid = (dev_cap, dev_feat)
    else:
        valid = None


    with open(path+'dictionary.pkl', 'rb') as f:
        worddict = pkl.load(f)

    return train, valid, test, worddict
def load_data ( load_train = True , load_dev = True , load_test = True , path = './' ) : ############# # LOAD DATA # ############# print '... loading data' if load_train : with open ( path + 'flicker_8k_align.train.pkl' , 'rb' ) as f : train_cap = pkl . load ( f ) train_feat = pkl . load ( f ) train = ( train_cap , train_feat ) else : train = None if load_test : with open ( path + 'flicker_8k_align.test.pkl' , 'rb' ) as f : test_cap = pkl . load ( f ) test_feat = pkl . load ( f ) test = ( test_cap , test_feat ) else : test = None if load_dev : with open ( path + 'flicker_8k_align.dev.pkl' , 'rb' ) as f : dev_cap = pkl . load ( f ) dev_feat = pkl . load ( f ) valid = ( dev_cap , dev_feat ) else : valid = None with open ( path + 'dictionary.pkl' , 'rb' ) as f : worddict = pkl . load ( f ) return train , valid , test , worddict