eef962609b8bfaef8454bada53fef75f26b702bd,test_layers.py,,test_transpose,#,14

Before Change


        (backends.ChainerBackend(), layers.ChainerTranspose),
        (backends.MXNetNdarrayBackend(), layers.GluonTranspose),
    ]
    patterns = [
        ("b c h w -> b (c h w)", dict(b=10), (10, 20 * 30 * 40)),
        ("b c (h1 h2) (w1 w2) -> b (c h2 w2) h1 w1", dict(h1=15, h2=2, w2=2), (10, 20 * 2 * 2, 15, 20)),
    ]

    for backend, TransposeLayer in backend_pairs:
        for pattern, axes_lengths, result_shape in patterns:
            x = numpy.arange(10 * 20 * 30 * 40, dtype="float32").reshape([10, 20, 30, 40])

After Change


            assert numpy.allclose(result1, result2)

            if TransposeLayer == layers.TorchTranspose:
                layer3 = deepcopy(layer2)
            elif TransposeLayer == layers.ChainerTranspose:
                layer3 = deepcopy(layer2)
            elif TransposeLayer == layers.GluonTranspose:
                // hybridization doesn"t work
                // layer3 = layer2.hybridize()
                layer3 = deepcopy(layer2)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: arogozhnikov/einops
Commit Name: eef962609b8bfaef8454bada53fef75f26b702bd
Time: 2018-10-08
Author: iamfullofspam@gmail.com
File Name: test_layers.py
Class Name:
Method Name: test_transpose


Project Name: glm-tools/pyglmnet
Commit Name: a68ad3bda020d9ade2b33c58a3f1406de41b682c
Time: 2018-09-05
Author: pavan.ramkumar@gmail.com
File Name: pyglmnet/pyglmnet.py
Class Name: GLM
Method Name: fit


Project Name: glm-tools/pyglmnet
Commit Name: 4367785c9131771d2dd80b45d4bbb4ca00bd24ac
Time: 2018-09-08
Author: pavan.ramkumar@gmail.com
File Name: pyglmnet/pyglmnet.py
Class Name: GLM
Method Name: fit