Decoder Object

Learn about the decoder object for the encoder-decoder model.

Chapter Goals:

  • Convert the encoder’s final state into the proper format for decoding with attention
  • Create a BasicDecoder object to use for decoding

A. Creating the initial state

The final state from the encoder is a tuple containing an LSTMStateTuple object for each layer of the BiLSTM. However, if we want to use this as the initial state for an attention-wrapped decoder, we need to convert it into an AttentionWrapperState.

For the conversion we ned to use ...