665b0076e089dbe60ecadc34bf2cbff9d7042482,tests/keras/optimizers_test.py,,test_adam,#,124

Before Change




def test_adam():
    adam = optimizers.Adam()
    _test_optimizer(adam)
    _test_optimizer(optimizers.Adam(decay=1e-3))
    new_adam = optimizers.Adam(learning_rate=0.1, epsilon=0.01, decay=0.1)
    _test_optimizer(new_adam)
    num_vars = int((len(adam.weights) - 1) / 2)
    ms = adam.weights[1:(num_vars + 1)]
    adam.weights.extend([K.zeros(K.int_shape(p), dtype=K.dtype(p)) for p in ms])
    new_adam.set_weights(adam.get_weights())
    _test_optimizer(new_adam)


def test_adamax():
    _test_optimizer(optimizers.Adamax(lr=0.002))

After Change




def test_adam():
    _test_optimizer(optimizers.Adam())
    _test_optimizer(optimizers.Adam(decay=1e-3))


def test_adamax():
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 8

Instances


Project Name: keras-team/keras
Commit Name: 665b0076e089dbe60ecadc34bf2cbff9d7042482
Time: 2019-05-28
Author: francois.chollet@gmail.com
File Name: tests/keras/optimizers_test.py
Class Name:
Method Name: test_adam


Project Name: keras-team/keras
Commit Name: 665b0076e089dbe60ecadc34bf2cbff9d7042482
Time: 2019-05-28
Author: francois.chollet@gmail.com
File Name: tests/keras/optimizers_test.py
Class Name:
Method Name: test_nadam


Project Name: keras-team/keras
Commit Name: 08f6bdeb5652550f36210f64aefda3d0d41e2d79
Time: 2019-05-28
Author: tanzheny@google.com
File Name: tests/keras/optimizers_test.py
Class Name:
Method Name: test_nadam


Project Name: keras-team/keras
Commit Name: 08f6bdeb5652550f36210f64aefda3d0d41e2d79
Time: 2019-05-28
Author: tanzheny@google.com
File Name: tests/keras/optimizers_test.py
Class Name:
Method Name: test_adam


Project Name: keras-team/keras
Commit Name: 665b0076e089dbe60ecadc34bf2cbff9d7042482
Time: 2019-05-28
Author: francois.chollet@gmail.com
File Name: tests/keras/optimizers_test.py
Class Name:
Method Name: test_adam