@attr('slow')
    def test_infer_shape_forward(self):

        def rand(*shape):
            r = numpy.asarray(numpy.random.rand(*shape), dtype='float64')
            return 1 - r * 2
        corrMM = corr.CorrMM

        adtens = T.dtensor4()
        bdtens = T.dtensor4()
        aivec_vals = [[4, 5, 6, 3], [6, 2, 8, 3], [3, 6, 7, 5],
                      [3, 6, 7, 5], [5, 2, 4, 3]]
        bivec_vals = [[7, 5, 3, 2], [4, 2, 5, 3], [5, 6, 3, 2],
                      [5, 6, 2, 3], [6, 2, 4, 3]]
        modes = ['valid', 'full', 'half', (1, 1), (2, 1), (1, 2), 1]
        subsamples = [(1, 1), (2, 1), (1, 2)]

        for aivec_val, bivec_val in zip(aivec_vals, bivec_vals):
            adtens_val = rand(*aivec_val)
            bdtens_val = rand(*bivec_val)
            for mode in modes:
                for subsample in subsamples:
                    # CorrMM
                    cdtens = corrMM(border_mode=mode, subsample=subsample)(adtens, bdtens)
                    self._compile_and_check([adtens, bdtens],
                                            [cdtens],
                                            [adtens_val, bdtens_val], corrMM,
                                            warn=False)
dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/tensor/nnet/tests/test_corr.py/TestCorr2D.test_infer_shape_forward/swapped operands of `-`