5d387c13673e9e1f621d8c7e0534f185a255c205,tests/chainer_tests/optimizer_hooks_tests/test_weight_decay.py,TestWeightDecay,setUp,#TestWeightDecay#,26
Before Change
class TestWeightDecay(unittest.TestCase):
def setUp(self):
self.target = SimpleLink(
np.arange(6, dtype=np.float32).reshape(2, 3),
np.arange(3, -3, -1, dtype=np.float32).reshape(2, 3))
def check_weight_decay(self):
w = self.target.param.data
g = self.target.param.grad
After Change
class TestWeightDecay(unittest.TestCase):
def setUp(self):
self.num_params = 3
arrs = [
np.random.uniform(-3, 3, (2, 3)).astype(np.float32)
for _ in range(self.num_params)]
grads = [
np.random.uniform(-3, 3, (2, 3)).astype(np.float32)
for _ in range(self.num_params)]
params = []
for arr, grad in zip(arrs, grads):
param = chainer.Parameter(arr)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 11
Instances
Project Name: chainer/chainer
Commit Name: 5d387c13673e9e1f621d8c7e0534f185a255c205
Time: 2019-07-05
Author: kshitijkalambarkar@gmail.com
File Name: tests/chainer_tests/optimizer_hooks_tests/test_weight_decay.py
Class Name: TestWeightDecay
Method Name: setUp
Project Name: chainer/chainer
Commit Name: 0d878f3fb55e2f36346ad36a1f71a4f43cc5eacb
Time: 2019-07-04
Author: kshitijkalambarkar@gmail.com
File Name: tests/chainer_tests/optimizer_hooks_tests/test_gradient_noise.py
Class Name: TestGradientNoise
Method Name: setUp
Project Name: chainer/chainer
Commit Name: 2e3c85383fb3b8c8d9fc42abca1824f052d12886
Time: 2019-06-30
Author: kshitijkalambarkar@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: aa770d8eedbe61120b88a4426e0d05a7940e3ac6
Time: 2019-06-30
Author: kshitijkalambarkar@gmail.com
File Name: tests/chainer_tests/optimizer_hooks_tests/test_lasso.py
Class Name: TestLasso
Method Name: setUp