http://lasagne.readthedocs.org/en/latest/user/tutorial.html#id2
I have tried the following
network_output = lasagne.layers.get_output(network)
f = theano.function([input_var], network_output[:,-1])
y_hat = f(X_train)
however I get NAN for all the samples in Y_hat here.
EDIT: I was able to solve the NAN issue. However now my prediction returns only one class (1)