def conv( x, w, b=None ): s = int(np.floor(w.get_value().shape[-1]/2.)) z = conv2d(x, w, border_mode='full')[:, :, s:-s, s:-s] if b is not None: z += b.dimshuffle('x', 0, 'x', 'x') return z