To be more specific, I found this to work well:
conv2d = T.signal.conv.conv2d x = T.dmatrix() y = T.dmatrix() veclen = x.shape[1] conv1d_expr = conv2d(x, y, image_shape=(1, veclen), border_mode='full') conv1d = theano.function([x, y], outputs=conv1d_expr)
border_mode = 'full' is optional.
source share