import numpy
import theano
x = theano.shared(numpy.arange(10))
print(x)
print(x.dimshuffle('x', 0).type)
print(x.dimshuffle(0, 'x').type)
print(x.reshape((1, x.shape[0])).type)
print(x.reshape((x.shape[0], 1)).type)
f = theano.function([], outputs=[x, x.dimshuffle('x', 0), x.reshape((1, x.
    shape[0]))])
theano.printing.debugprint(f)
Создайте общую строку в theano