717b359e5d7ab22696f239e710e65d0d4795d0b8,tests/chainerx_tests/unit_tests/routines_tests/test_creation.py,TestMeshgrid,generate_inputs,#TestMeshgrid#,1281

Before Change


            self.check_backward_options.update({"rtol": 1e-2, "atol": 1e-2})

    def generate_inputs(self):
        arrs = ()
        for _ in range(self.input_arrs):
            arrs += (numpy.linspace(random.randint(-10, 0),
                                    random.randint(1, 10),
                                    random.randint(3, 7)).astype(self.dtype),)

        return arrs

    def forward_xp(self, inputs, xp):
        return tuple(xp.meshgrid(*inputs, indexing=self.indexing))

After Change


            self.check_backward_options.update({"rtol": 1e-2, "atol": 1e-2})

    def generate_inputs(self):
        return tuple(
            numpy.linspace(
                numpy.random.uniform(-5, -1),
                numpy.random.uniform(1, 5),
                size)
            .astype(self.dtype)
            for size in self.input_lens)

    def forward_xp(self, inputs, xp):
        return tuple(xp.meshgrid(*inputs, indexing=self.indexing))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: chainer/chainer
Commit Name: 717b359e5d7ab22696f239e710e65d0d4795d0b8
Time: 2019-11-12
Author: kataoka@preferred.jp
File Name: tests/chainerx_tests/unit_tests/routines_tests/test_creation.py
Class Name: TestMeshgrid
Method Name: generate_inputs


Project Name: RasaHQ/rasa
Commit Name: 89326c618dcf420a79139034b02250a09335ba01
Time: 2021-01-26
Author: mr.voov@gmail.com
File Name: rasa/utils/tensorflow/layers.py
Class Name: DotProductLoss
Method Name: _random_indices


Project Name: analysiscenter/batchflow
Commit Name: e0df81789b43a95c32a8aa9e6ce64baba216c5fe
Time: 2017-12-15
Author: g.ivanov@analysiscenter.ru
File Name: dataset/batch_image.py
Class Name: BaseImagesBatch
Method Name: rotate