Print output of Theano network

Sorry, very new question ... I trained a neural network with Theano and now I want to see what it outputs for a specific input.

So I can say:

test_pred = lasagne.layers.get_output(output_layer, dataset['X_test'])

      

where output_layer is my network. Now the last layer turns out to be soft, so if I say:

print "%s" % test_pred

      

I get

Softmax.0

      

I understand why I think so (namely, because the output is a symbolic tensor variable), but I don't see how I can see the actual values.

And just to let you know, I have read this post as well as the printing documentation and FAQ , which I also do not fully understand, I am afraid ...

+3


source to share


1 answer


  • Use .eval()

    to evaluate a symbolic expression
  • Use test values


+1


source







All Articles