title: theano - print value of TensorVariable
body: <p><strong>How can I print the numerical value of a theano TensorVariable?</strong>
  I'm new to theano, so please be patient :)</p>
  
  <p>I have a function where I get <code>y</code> as a parameter.
  Now I want to debug-print the shape of this <code>y</code> to the console.
  Using</p>
  
  <pre><code>print y.shape
  </code></pre>
  
  <p>results in the console output (i was expecting numbers, i.e. <code>(2,4,4)</code>):</p>
  
  <pre><code>Shape.0
  </code></pre>
  
  <p>Or how can I print the numerical result of for example the following code (this counts how many values in <code>y</code> are bigger than half the maximum):</p>
  
  <pre><code>errorCount = T.sum(T.gt(T.abs_(y),T.max(y)/2.0))
  </code></pre>
  
  <p><code>errorCount</code> should be a single number because <code>T.sum</code> sums up all the values.
  But using</p>
  
  <pre><code>print errCount
  </code></pre>
  
  <p>gives me (expected something like <code>134</code>):</p>
  
  <pre><code>Sum.0
  </code></pre>