print num return ax, fig pca = True subsample = 1 pca = True cnn = True locate = 95 subject_id = 7 if subject_id is 'aud': treats = [ None ] #, 'left/auditory', 'right/auditory', 'left/visual', 'right/visual'] else: treats = [None] #, 'face/famous','scrambled','face/unfamiliar'] nummax = len(treats) ax = None fig = None num = 0 for treat in treats: if subject_id is 'aud': meas_dims, m, p, n_steps, total_batch_size, Wt = nn_prepro.aud_dataset( justdims=True, cnn=cnn, locate=locate, treat=treat) else: meas_dims, m, p, n_steps, total_batch_size, Wt = nn_prepro.faces_dataset( subject_id, cnn=cnn, justdims=True, locate=locate, treat=treat)
orient=None, noise_flag=True, selection='all', pca=True, subsample=1, justdims=True, cnn=cnn, locate=locate, treat=treat, rnn=rnn, Wt=Wt) #print p, "Dipoles returned" else: meas_dims, m, p, n_steps, total_batch_size, Wt = nn_prepro.faces_dataset( subject_id, cnn=cnn, justdims=True, locate=locate, treat=None) meas_dims, m, p, n_steps, total_batch_size, Wt = nn_prepro.faces_dataset( subject_id, cnn=cnn, justdims=True, locate=locate, treat=treat, Wt=Wt) test, val, batch_list, batches = nn_prepro.ttv( total_batch_size, test_frac, val_frac, batch_frac,
'n_layer', 'n_lstm', 'n_steps', 'train step', 'xentropy', 'rmse', 'accuracy', 'xentropy_last', 'rmse_last', 'accuracy_last' ] subsample = 1 fname = './data/check_nn_real_relu_%s_%s_pca_%s_rand_%s.csv' % ( train_id, test_id, pca, rand_test) with open(fname, 'a') as csvfile: writer = csv.DictWriter(csvfile, fieldnames=fieldnames) writer.writeheader() for [ n_conv1, n_conv2, n_lstm, n_layer, test_frac, val_frac, batch_frac ] in params_list: meas_dims, m, p, n_steps, total_batch_size = nn_prepro.faces_dataset( train_id, locate=True) meas_dims, m, p, n_steps, total_batch_size_test = nn_prepro.faces_dataset( test_id, locate=True) a = np.arange(0, total_batch_size) a_test = np.arange(0, total_batch_size_test) #halt criteria delta_v_err_halt = 1. delta_err_halt = 2e-5 val_step = 50 cost = 'rmse' cost_step = 'last' learning_rate = 0.001 dropout = 1.0