Final States
Learn about the final state output of an LSTM and BiLSTM.
Chapter Goals:
- Learn about the final states for an LSTM and BiLSTM
A. The encoder
In an encoder-decoder model for seq2seq tasks, there are two components: the encoder and the decoder. The encoder is responsible for extracting useful information from the input sequence. For NLP applications, the encoder is normally an LSTM or BiLSTM.
B. LSTM final state
When using an LSTM or BiLSTM encoder, we need to pass the final state of the encoder into the decoder. The final state of an LSTM in TensorFlow is represented by the ...