title: Is my learning_rate actually getting changed in theano?
body: <p>I'm trying to adjust the learning rate of the gradient descent algorithm. I would like to be able to confirm whether or not my changes to <code>learning_rate</code> are actually having an effect on my theano training function.</p>
  <p>Sample code:</p>
  <pre><code>#set up the updates
  for param in params:
      updates.append((param, param-learning_rate*T.grad(cost, param)))
  #set up the training function
  train = theano.function(inputs=[index], outputs=[cost], updates=updates, givens={x:self.X[index:index+mini_batch_size,:]})
  
  #run through the minibatches
  for epoch in range(n_epochs):
      for row in range(0,self.m, mini_batch_size):
          cost = train(row)
      #occasionally adjust the learning rate
      learning_rate = learning_rate/2.0
  </code></pre>
  <p>Is this going to work as I desire? How can I confirm?</p>
  <h1>Edit:</h1>
  <p>It seems like this will not work, based on this little test:</p>
  <pre><code>x = th.tensor.dscalar()
  rate=5.0
  f = th.function(inputs=[x], outputs=2*x*rate)
  print(f(10))
  &gt;&gt; 100.0
  rate=0.0
  print(f(10))
  &gt;&gt; 100.0
  </code></pre>
  <p>What is the correct way to go about this?</p>