title: Purpose of 'givens' variables in Theano.function
body: <p>I was reading the code for the logistic function given at <a href="http://deeplearning.net/tutorial/logreg.html" rel="nofollow noreferrer">http://deeplearning.net/tutorial/logreg.html</a>. I am confused about the difference between <code>inputs</code> &amp; <code>givens</code> variables for a function. The functions that compute mistakes made by a model on a minibatch are:</p>
  
  <pre><code> test_model = theano.function(inputs=[index],
          outputs=classifier.errors(y),
          givens={
              x: test_set_x[index * batch_size: (index + 1) * batch_size],
              y: test_set_y[index * batch_size: (index + 1) * batch_size]})
  
  validate_model = theano.function(inputs=[index],
          outputs=classifier.errors(y),
          givens={
              x: valid_set_x[index * batch_size:(index + 1) * batch_size],
              y: valid_set_y[index * batch_size:(index + 1) * batch_size]})
  </code></pre>
  
  <p>Why couldn't/wouldn't one just make x&amp; y shared input variables and let them be defined when an actual model instance is created?</p>