how could i get both the final hidden state and sequence in a LSTM layer when using a bidirectional wrapper : <p>i have followed the steps in <a href="https://machinelearningmastery.com/return-sequences-and-return-states-for-lstms-in-keras/" rel="noreferrer">https://machinelearningmastery.com/return-sequences-and-return-states-for-lstms-in-keras/</a>
But when it comes to the Bidirectional lstm, i tried this</p>

<pre><code>lstm, state_h, state_c = Bidirectional(LSTM(128, return_sequences=True, return_state= True))(input)
</code></pre>

<p>but it won't work.</p>

<p>is there some approach to  get both the final hidden state and sequence in a  LSTM layer when using a bidirectional wrapper</p>
