Yeah if I remember correctly when I first wrote this code, if I do what you suggested one of the theano optimization was failing. But I should check that again whether if it is fixed or not.