3

I am sorry, very newbee question... I trained a neural network with Theano and now I want to see what it outputs for a certain 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 happens to be a softmax, so if I say:

print "%s" % test_pred

I get

Softmax.0

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

And just so you know, I did read this post and also the documentation on printing and FAQ, which I am also not fully grasping, I am afraid...

Community
  • 1
  • 1
Tom
  • 2,769
  • 2
  • 17
  • 22

1 Answers1

1
  1. Use .eval() to evaluate the symbolic expression
  2. Use Test Values
Alexander McFarlane
  • 10,643
  • 9
  • 59
  • 100
  • Indeed, if I do `print "%s" % test_pred.eval()` I see the actual outputs. Great. Thanks! – Tom Jun 12 '15 at 07:28