Theano/Theano — pull request #913 by pascanur (2012-09-10 18:56:21+00:00)
Title: New scan optimizations

With these changes the grad of scan is about 10 times faster for a RNN (especially when using pure SGD, no minibatches), and also improves the minibatch case.

These optimization can have positive effects in many more cases. There is a memory vs speed exchange going on for some of the optimization, so I've added a new tag ('more_mem') to be able to
exclude those optimizations that lead to more memory consumption.