Theano softmax for tensors?

I usually reshape the input, apply the function, and reshape it back.