#dataset_info = load_all_data() #data_set_x = dataset_info[0] #maxBatchSize = numpy.int_(dataset_info[1]) #batch_size = maxBatchSize #n_train_batches = 28 #n_valid_batches = 1 #n_test_batches = 1 datapathpre = '/vega/stats/users/sl3368/Data_LC/LowNormData/' dataset_info = load_class_data_batch(datapathpre + 'LC_stim_5.mat') stim = dataset_info[0] data_set_x = theano.shared(stim, borrow=True) #validation and testing - for now, use last one dataset_info_vt = load_class_data_vt(datapathpre + 'LC_stim_15.mat') data_set_x_vt = dataset_info_vt[0] batch_size = 2000 n_batches = data_set_x.shape[0].eval()/batch_size print 'n_batches: '+str(n_batches) n_val_batches = 10 n_test_batches = 10 n_train_batches = n_batches #data_set_x.shape[0].eval()/batch_size - n_val_batches - n_test_batches print 'Number of batches for training: '+str(n_train_batches) all_inds = numpy.arange(n_batches) numpy.random.shuffle(all_inds); train_inds = all_inds[0:n_train_batches] val_inds = numpy.arange(n_val_batches)#all_inds[n_train_batches:n_train_batches+n_val_batches] #numpy.random.choice(n_batches,n_val_batches,replace=False) test_inds = numpy.arange(n_val_batches)+n_val_batches
n_val_batches = 200 n_test_batches = 10 #filepath for saving parameters savefilename = '/vega/stats/users/sl3368/rnn_code/saves/params/lstm/3_layer/1000_1000_1000/5th_5_6.save' ################################################ # Load Data ################################################ dataset_info = load_class_data_batch(datapathpre + 'LC_stim_5.mat') stim = dataset_info[0] data_set_x = theano.shared(stim, borrow=True) #validation and testing - for now, use last one dataset_info_vt = load_class_data_vt(datapathpre + 'LC_stim_15.mat') data_set_x_vt = dataset_info_vt[0] n_batches = data_set_x.shape[0].eval() / song_size n_train_batches = n_batches print 'Number of songs in single matlab chunk: ' + str(n_train_batches) all_inds = numpy.arange(n_batches) numpy.random.shuffle(all_inds) train_inds = all_inds[0:n_train_batches] val_inds = numpy.arange(n_val_batches) test_inds = numpy.arange(n_val_batches) + n_val_batches ###################### # BUILD ACTUAL MODEL # ######################