Theano version of OrientedPartsLayer.