0d878f3fb55e2f36346ad36a1f71a4f43cc5eacb,tests/chainer_tests/optimizer_hooks_tests/test_gradient_noise.py,TestGradientNoise,setUp,#TestGradientNoise#,31
Before Change
eta = 0.01
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))
self.noise_value = np.random.normal(
loc=0, scale=np.sqrt(self.eta / np.power(1, 0.55)),
size=(2, 3)).astype(np.float32)
After Change
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)
param.grad = grad
params.append(param)
self.target = SimpleLink(params)
self.noise_value = np.random.normal(
loc=0, scale=np.sqrt(self.eta / np.power(1, 0.55)),
size=(2, 3)).astype(np.float32)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 45
Instances
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: 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: 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
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: 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