e5a431f8966a56c3de398f7f969b41f1deec6d70,tests/distributions/test_transforms.py,TransformTests,test_lower_cholesky_affine,#TransformTests#,145

Before Change


            transform = T.LowerCholeskyAffine(loc, scale_tril)
            self._test_inverse(input_dim, transform)
            self._test_jacobian(input_dim, transform)
            for shape in [(3,), (3, 4)]:
                self._test_shape(shape + (input_dim,), transform)

    def test_batchnorm_inverses(self):
        for input_dim in [2, 5, 10]:
            transform = T.batchnorm(input_dim)
            transform._inverse(torch.normal(torch.arange(0., input_dim), torch.arange(1., 1. + input_dim) / input_dim))

After Change


            scale_tril = scale_tril.tril(0)
            return T.LowerCholeskyAffine(loc, scale_tril)

        self._test(transform_factory)

    def test_neural_autoregressive(self):
        for activation in ["ELU", "LeakyReLU", "sigmoid", "tanh"]:
            self._test(partial(T.neural_autoregressive, activation=activation), inverse=False)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: uber/pyro
Commit Name: e5a431f8966a56c3de398f7f969b41f1deec6d70
Time: 2020-03-09
Author: stefandwebb@gmail.com
File Name: tests/distributions/test_transforms.py
Class Name: TransformTests
Method Name: test_lower_cholesky_affine


Project Name: dmlc/dgl
Commit Name: eeeb52f464cea18ef41b9108b3823aa91ebce31a
Time: 2020-02-04
Author: coin2028@hotmail.com
File Name: tests/compute/test_heterograph.py
Class Name:
Method Name: test_query


Project Name: dmlc/dgl
Commit Name: bd1e48a51e348b0e8e25622325adeb5ddea1c0ea
Time: 2020-04-09
Author: mufeili1996@gmail.com
File Name: tests/compute/test_transform.py
Class Name:
Method Name: test_khop_graph


Project Name: scipy/scipy
Commit Name: 97ee3ec6e2a137ad6758c662e631569ab054fcf8
Time: 2008-04-07
Author: cournape@gmail.com
File Name: scipy/io/arff/tests/test_data.py
Class Name: DataTest
Method Name: test1