Indeed I want to change the learning rate at different periods of training. Something like:
for i in range(iter_num):
learn_rate = i*alpha
do_training(learn_rate,...)
Apparently recompiling a new function for every iteration is going to be too slow. So I was wondering is there a better way to do it in Theano? Thanks!
You can make the learning rate a symbolic variable and pass it into the training function like this:
Note that the training function now has three parameters; the third is the learning rate.