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


    // check that output changes after states are reset
    // (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: 3

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: rail-berkeley/softlearning
Commit Name: 6ddc739291c7d6399f8c67d549d8147567fc04dc
Time: 2018-10-20
Author: hartikainen@berkeley.edu
File Name: softlearning/policies/latent_space_policy.py
Class Name: LatentSpacePolicy
Method Name: get_action


Project Name: rail-berkeley/softlearning
Commit Name: 9caa24c58689c1d6f3d982f623ceab8f78e7362d
Time: 2018-10-20
Author: hartikainen@berkeley.edu
File Name: softlearning/policies/gmm.py
Class Name: GMMPolicy
Method Name: get_actions