theano.tensor.batched_tensordot(x, y, axes)

Merge theano.tensor.tensordot with theano.batched_dot and you get a more powerful function. Useful for when you want to do more complicated stuff like conditional computation or gating (mixtures of experts and the like). Implemented using theano.scan.