def perform(self, node, inp, out_):
        kern, topgrad, shape = inp
        kern = numpy.asarray(kern)
        topgrad = numpy.asarray(topgrad)
        o, = out_

        mode = self.border_mode
        if not ((isinstance(mode, tuple) and 0 >= min(mode)) 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))

        pad_h, pad_w = 0, 0
        if mode == "full":
            pad_h, pad_w = (kern.shape[2] - 1, kern.shape[3] - 1)
        elif mode == "half":
            pad_h, pad_w = (kern.shape[2] // 2, kern.shape[3] // 2)
        elif isinstance(mode, tuple):
            pad_h, pad_w = map(int, self.border_mode)
        if self.subsample[0] > 1 or self.subsample[1] > 1:
            new_shape = (topgrad.shape[0], topgrad.shape[1],
                         shape[0] + 2 * pad_h - kern.shape[2] + 1,
                         shape[1] + 2 * pad_w - kern.shape[3] + 1)
            new_topgrad = numpy.zeros((new_shape), dtype=topgrad.dtype)
            new_topgrad[:, :, ::self.subsample[0], ::self.subsample[1]] = topgrad
            topgrad = new_topgrad
        kern = kern.transpose(1, 0, 2, 3)
        if self.filter_flip:
            topgrad = topgrad[:, :, ::-1, ::-1]
        img = self.conv2d(topgrad, kern, mode="full")
        if self.filter_flip:
            img = img[:, :, ::-1, ::-1]
        if pad_h > 0 or pad_w > 0:
            img = img[:, :, pad_h:img.shape[2] - pad_h, pad_w:img.shape[3] - pad_w]
        o[0] = node.outputs[0].type.filter(img)
dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/tensor/nnet/abstract_conv.py/AbstractConv2d_gradInputs.perform/swapped operands of `>=`