ae72ea0bfe7f7041d6f7580427fa1f69158bab7e,tests/keras/backend/backend_test.py,TestBackend,test_rnn_no_states,#TestBackend#,665

Before Change


        outputs_list = []

        for k in BACKENDS:
            rnn_fn = rnn_step_fn(k)
            inputs = k.variable(input_val)
            initial_states = []
            last_output, outputs, new_states = k.rnn(rnn_fn, inputs,
                                                     initial_states,
                                                     go_backwards=False,
                                                     mask=None)
            last_output_list.append(k.eval(last_output))
            outputs_list.append(k.eval(outputs))
            assert len(new_states) == 0

After Change



        last_y1, y1, h1 = ref_rnn(x, [wi, None, None], None,
                                  go_backwards=False, mask=None)
        last_y2, y2, h2 = K.rnn(rnn_fn, x_k, [],
                                go_backwards=False, mask=None)

        assert len(h2) == 0
        last_y2 = K.eval(last_y2)
        y2 = K.eval(y2)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: keras-team/keras
Commit Name: ae72ea0bfe7f7041d6f7580427fa1f69158bab7e
Time: 2018-03-05
Author: me@taehoonlee.com
File Name: tests/keras/backend/backend_test.py
Class Name: TestBackend
Method Name: test_rnn_no_states


Project Name: OpenNMT/OpenNMT-py
Commit Name: ff010950b519bbcccc14f82abcfd9b5697be1b44
Time: 2017-01-08
Author: alerer@fb.com
File Name: OpenNMT/onmt/Models.py
Class Name: Encoder
Method Name: forward