def perform(self, node, inp, out_):
        img, kern = inp
        img = numpy.asarray(img)
        kern = numpy.asarray(kern)
        o, = out_
        mode = self.border_mode

        if not ((isinstance(mode, tuple) and min(mode) >= 0) or
                mode in ('valid', 'full', 'half')):
            raise ValueError(
                'invalid border_mode {}, which must be either '
                '"valid", "full", "half", an integer or a pair of'
                ' integers'.format(mode))

        if mode == "full":
            mode = (kern.shape[2] - 1, 1 - kern.shape[3])
        elif mode == "half":
            mode = (kern.shape[2] // 2, kern.shape[3] // 2)
        if isinstance(mode, tuple):
            pad_h, pad_w = map(int, mode)
            mode = "valid"
            new_img = numpy.zeros((img.shape[0], img.shape[1],
                                   img.shape[2] + 2 * pad_h,
                                   img.shape[3] + 2 * pad_w), dtype=img.dtype)
            new_img[:, :, pad_h:img.shape[2] + pad_h, pad_w:img.shape[3] + pad_w] = img
            img = new_img
        if not self.filter_flip:
            kern = kern[:, :, ::-1, ::-1]
        conv_out = self.conv2d(img, kern, mode="valid")
        conv_out = conv_out[:, :, ::self.subsample[0], ::self.subsample[1]]

        o[0] = node.outputs[0].type.filter(conv_out)
dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/tensor/nnet/abstract_conv.py/AbstractConv2d.perform/swapped operands of `-`