Use 2 "tricks" to speed up Theano version.