Also, I think this is recently fixed on the theano side: https://github.com/Theano/Theano/issues/6580