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