96f3404a574faa97b1895753fed7a602f853baa7,tests/keras/layers/test_recurrent.py,,_runner,#Any#,11

Before Change


    layer.input = K.variable(np.ones((nb_samples, timesteps, input_dim)))
    out1 = K.eval(layer.get_output(train))
    assert(out.shape == (nb_samples, output_dim))
    out2 = K.eval(layer.get_output(train))
    // if the state is not reset, output should be different
    assert(out1.max() != out2.max())
    // check that output stays the same when state is reset
    layer.reset_states()

After Change


    // (even though the model itself didn"t change)
    layer.reset_states()
    out3 = model.predict(np.ones((nb_samples, timesteps, input_dim)))
    assert(out2.max() != out3.max())


class TestRNNS(unittest.TestCase):
    
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: keras-team/keras
Commit Name: 96f3404a574faa97b1895753fed7a602f853baa7
Time: 2015-12-08
Author: francois.chollet@gmail.com
File Name: tests/keras/layers/test_recurrent.py
Class Name:
Method Name: _runner


Project Name: keras-team/keras
Commit Name: b95fcf7f52aca8ad0b1afb3cfc64c8eed534fafe
Time: 2017-07-29
Author: me@taehoonlee.com
File Name: tests/keras/backend/backend_test.py
Class Name: TestBackend
Method Name: test_eye


Project Name: keras-team/keras
Commit Name: c714efa31658ef43eaddc7b9c4340cb915bf8211
Time: 2019-06-24
Author: francois.chollet@gmail.com
File Name: tests/keras/test_sequential_model.py
Class Name:
Method Name: test_sequential


Project Name: keras-team/keras
Commit Name: b95fcf7f52aca8ad0b1afb3cfc64c8eed534fafe
Time: 2017-07-29
Author: me@taehoonlee.com
File Name: tests/keras/backend/backend_test.py
Class Name: TestBackend
Method Name: test_gather