1527c8c1e4b5cfa59703d7fd6c91d89310db9a15,kymatio/scattering2d/tests/test_torch_scattering2d.py,TestScatteringTorch2D,test_Scattering2D,#TestScatteringTorch2D#Any#,392

Before Change


        backend, device = backend_device

        test_data_dir = os.path.dirname(__file__)
        data = torch.load(os.path.join(test_data_dir, "test_data_2d.pt"))

        x = data["x"]
        S = data["Sx"]
        J = data["J"]

        // we need to reorder S from interleaved (how it"s saved) to o0, o1, o2
        // (which is how it"s now computed)

        o0, o1, o2 = self.reorder_coefficients_from_interleaved(J, L=8)
        reorder = torch.from_numpy(np.concatenate((o0, o1, o2)))
        S = S[..., reorder, :, :]

        pre_pad = data["pre_pad"]

        M = x.shape[2]

After Change



        test_data_dir = os.path.dirname(__file__)
        with open(os.path.join(test_data_dir, "test_data_2d.npz"), "rb") as f:
            buffer = io.BytesIO(f.read())
            data = np.load(buffer)

        x = torch.from_numpy(data["x"])
        S = torch.from_numpy(data["Sx"])
        J = data["J"]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: kymatio/kymatio
Commit Name: 1527c8c1e4b5cfa59703d7fd6c91d89310db9a15
Time: 2020-02-18
Author: edouard.oyallon@ens.fr
File Name: kymatio/scattering2d/tests/test_torch_scattering2d.py
Class Name: TestScatteringTorch2D
Method Name: test_Scattering2D


Project Name: kymatio/kymatio
Commit Name: 1527c8c1e4b5cfa59703d7fd6c91d89310db9a15
Time: 2020-02-18
Author: edouard.oyallon@ens.fr
File Name: kymatio/scattering2d/tests/test_scattering2d.py
Class Name:
Method Name: test_Scattering2D


Project Name: deepmind/dm_control
Commit Name: 904598fd329014cd06e4daa9d6a892d1042f4fca
Time: 2019-02-21
Author: alimuldal@google.com
File Name: dm_control/locomotion/soccer/boxhead.py
Class Name:
Method Name: _asset_png_with_background_rgba_bytes