bc0a97e62a0340b4e440c054fedc0ea98fd4eb73,kymatio/scattering2d/core/scattering2d.py,,scattering2d,#Any#Any#Any#Any#Any#Any#Any#Any#Any#,4

Before Change



    output_shape = (x.shape[0], output_size) + S_0.shape[-2:]

    S = empty_like(x, output_shape)

    S[..., 0, :, :] = S_0
    n_order1 = 1
    n_order2 = 1 + order1_size

    for n1 in range(len(psi)):
        j1 = psi[n1]["j"]
        U_1_c = cdgmm(U_0_c, psi[n1][0])
        if j1 > 0:
            U_1_c = subsample_fourier(U_1_c, k=2 ** j1)
        U_1_c = fft(U_1_c, "C2C", inverse=True)
        U_1_c = modulus(U_1_c)
        U_1_c = fft(U_1_c, "C2C")

        // Second low pass filter
        S_1_c = cdgmm(U_1_c, phi[j1])
        S_1_c = subsample_fourier(S_1_c, k=2 ** (J - j1))

        S_1_r = fft(S_1_c, "C2R", inverse=True)
        S_1_r = unpad(S_1_r)

        S[..., n_order1, :, :] = S_1_r
        n_order1 += 1

        if max_order < 2:
            continue
        for n2 in range(len(psi)):
            j2 = psi[n2]["j"]
            if j2 <= j1:
                continue
            U_2_c = cdgmm(U_1_c, psi[n2][j1])
            U_2_c = subsample_fourier(U_2_c, k=2 ** (j2 - j1))
            U_2_c = fft(U_2_c, "C2C", inverse=True)
            U_2_c = modulus(U_2_c)
            U_2_c = fft(U_2_c, "C2C")

            // Third low pass filter
            S_2_c = cdgmm(U_2_c, phi[j2])
            S_2_c = subsample_fourier(S_2_c, k=2 ** (J - j2))

            S_2_r = fft(S_2_c, "C2R", inverse=True)
            S_2_r = unpad(S_2_r)

            S[..., n_order2, :, :] = S_2_r
            n_order2 += 1

    return S

After Change


    if max_order == 2:
        output_size += order2_size

    out_S_0, out_S_1, out_S_2 = [], [], []

    U_r = pad(x)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: kymatio/kymatio
Commit Name: bc0a97e62a0340b4e440c054fedc0ea98fd4eb73
Time: 2020-02-18
Author: janden@flatironinstitute.org
File Name: kymatio/scattering2d/core/scattering2d.py
Class Name:
Method Name: scattering2d


Project Name: scikit-image/scikit-image
Commit Name: b8a5e5db6c2c0ff9540d84c11c05b21fc6023ae6
Time: 2020-05-04
Author: rfezzani@gmail.com
File Name: skimage/color/colorconv.py
Class Name:
Method Name: rgba2rgb


Project Name: matplotlib/matplotlib
Commit Name: 82f4176543845a0c3ad86f548981f23af0daa7d5
Time: 2019-06-04
Author: bsipocz@gmail.com
File Name: lib/matplotlib/projections/geo.py
Class Name: AitoffTransform
Method Name: transform_non_affine