1d2ad790dd43a2d702176c1170b2f3fd592a385a,tests/keras/layers/wrappers_test.py,,test_Bidirectional_state_reuse,#,321

Before Change



    inputs = Input((timesteps, dim))
    layer = wrappers.Bidirectional(rnn(units, return_state=True, return_sequences=True))
    outputs = layer(inputs)
    output, state = outputs[0], outputs[1:]

    // test passing invalid initial_state: passing a tensor
    with pytest.raises(ValueError):

After Change


    state = layer(input1)[1:]

    // test passing invalid initial_state: passing a tensor
    input2 = Input((timesteps, dim))
    with pytest.raises(ValueError):
        output = wrappers.Bidirectional(rnn(units))(input2, initial_state=state[0])

    // test valid usage: passing a list
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: keras-team/keras
Commit Name: 1d2ad790dd43a2d702176c1170b2f3fd592a385a
Time: 2018-01-30
Author: myutwo150@users.noreply.github.com
File Name: tests/keras/layers/wrappers_test.py
Class Name:
Method Name: test_Bidirectional_state_reuse


Project Name: onnx/onnxmltools
Commit Name: 80e1d0aba201d45ba32542327ab1a63e074a759e
Time: 2018-05-11
Author: wschin@outlook.com
File Name: tests/end2end/test_single_operator_with_cntk_backend.py
Class Name: TestKeras2CoreML2ONNX
Method Name: test_pooling_4d


Project Name: keras-team/autokeras
Commit Name: 16474aee0c575e615c78d32f2a170c3d7f8f0082
Time: 2017-12-30
Author: jhfjhfj1@gmail.com
File Name: autokeras/graph.py
Class Name: Graph
Method Name: produce_model