Ho iniziato a imparare come usare theano con lasagne e ho iniziato con l'esempio mnist. Ora, voglio provare il mio esempio: ho un file train.csv, in cui ogni riga inizia con 0 o 1 che rappresenta la risposta corretta, seguita da 773 0 e 1 che rappresentano l'input. Non ho capito come posso trasformare questo file in array numpy ricercati nella funzione load_database(). questa è la parte dalla funzione originaria per il database mnist:array numpy da file csv per lasagne
...
with gzip.open(filename, 'rb') as f:
data = pickle_load(f, encoding='latin-1')
# The MNIST dataset we have here consists of six numpy arrays:
# Inputs and targets for the training set, validation set and test set.
X_train, y_train = data[0]
X_val, y_val = data[1]
X_test, y_test = data[2]
...
# We just return all the arrays in order, as expected in main().
# (It doesn't matter how we do this as long as we can read them again.)
return X_train, y_train, X_val, y_val, X_test, y_test
e ho bisogno di ottenere il X_train (l'ingresso) e il y_train (all'inizio di ogni riga) dai miei file CSV.
Grazie!