def output(self, x, a): x = T.reshape(x, (-1, self.n_inputs, self.height, self.width)) return T.tanh(conv2d(x, self.W) + self.b.dimshuffle('x', 0, 'x', 'x'))