f03d5ba6362a60773d4a2830f5ddf52bb42a3166,tests/chainer_tests/optimizer_hooks_tests/test_lasso.py,TestLasso,setUp,#TestLasso#,38

Before Change


@testing.backend.inject_backend_tests(None, _backend_params)
class TestLasso(unittest.TestCase):
    def setUp(self):
        num_params = 3
        arrs = [
            np.random.uniform(-3, 3, (2, 3)).astype(np.float32)
            for _ in range(num_params)]
        grads = [
            np.random.uniform(-3, 3, (2, 3)).astype(np.float32)
            for _ in range(num_params)]
        params = []
        for arr, grad in zip(arrs, grads):
            param = chainer.Parameter(arr)

After Change


@testing.backend.inject_backend_tests(None, _backend_params)
class TestLasso(unittest.TestCase):
    def setUp(self):
        self.target = utils.ParametersLink.from_param_props(
            ((2, 3), (2, 0, 1), ()))

    def check_lasso(self, backend_configs):
        target = self.target
        assert len(backend_configs) == len(list(target.params()))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: chainer/chainer
Commit Name: f03d5ba6362a60773d4a2830f5ddf52bb42a3166
Time: 2019-07-15
Author: niboshi000@gmail.com
File Name: tests/chainer_tests/optimizer_hooks_tests/test_lasso.py
Class Name: TestLasso
Method Name: setUp


Project Name: chainer/chainer
Commit Name: f03d5ba6362a60773d4a2830f5ddf52bb42a3166
Time: 2019-07-15
Author: niboshi000@gmail.com
File Name: tests/chainer_tests/optimizer_hooks_tests/test_gradient_hard_clipping.py
Class Name: TestGradientHardClipping
Method Name: setUp


Project Name: chainer/chainer
Commit Name: f03d5ba6362a60773d4a2830f5ddf52bb42a3166
Time: 2019-07-15
Author: niboshi000@gmail.com
File Name: tests/chainer_tests/optimizer_hooks_tests/test_gradient_noise.py
Class Name: TestGradientNoise
Method Name: setUp