60c2e01bfc93bc01da21b79ebe9f222e601e1931,kymatio/scattering2d/core/scattering2d.py,,scattering2d,#,4
Before Change
concatenate = backend.concatenate
// S is simply a dictionary if we do not perform the averaging...
S = {}
U_r = pad(x)
U_0_c = fft(U_r, "C2C")
// First low pass filter
U_1_c = cdgmm(U_0_c, phi[0])
U_1_c = subsample_fourier(U_1_c, k=2 ** J)
S_0 = fft(U_1_c, "C2R", inverse=True)
S_0 = unpad(S_0)
S[()] = S_0
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[(n1,)] = S_1_r
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[(n1, n2)] = S_2_r
if vectorize:
sorted_keys = sorted(S.keys(), key=lambda x: (len(x),) + x)
S = [S[key] for key in sorted_keys]
S = concatenate(S)
After Change
concatenate = backend.concatenate
// Define lists for output.
out_S_0, out_S_1, out_S_2 = [], [], []
U_r = pad(x)
U_0_c = fft(U_r, "C2C")
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances
Project Name: kymatio/kymatio
Commit Name: 60c2e01bfc93bc01da21b79ebe9f222e601e1931
Time: 2020-02-18
Author: janden@flatironinstitute.org
File Name: kymatio/scattering2d/core/scattering2d.py
Class Name:
Method Name: scattering2d
Project Name: CamDavidsonPilon/lifelines
Commit Name: b1d839cb8e521c3cf2efaebe17082f1a9680a253
Time: 2020-05-13
Author: cam.davidson.pilon@gmail.com
File Name: experiments/working_npmle.py
Class Name:
Method Name: create_turnball_intervals
Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 8c18cecf15a8935d8bf712edcc91ac05daf2176e
Time: 2020-06-16
Author: tmatsuo@google.com
File Name: appengine/standard/noxfile-template.py
Class Name:
Method Name:
Project Name: yzhao062/pyod
Commit Name: f7274c1889e6c31ab89dc0409fa2ac92e6f01228
Time: 2019-03-11
Author: yalmardeny@tssg,org
File Name: pyod/models/sod.py
Class Name: SOD
Method Name: _snn