Learn Before
Formula
RNN Decoder Hidden State Recurrence
Within a sequence-to-sequence decoder, the RNN updates its hidden state at each time step using a transformation function that takes three inputs: the previous target token , the encoder's context variable , and the decoder's hidden state from the preceding time step . The resulting hidden state update is expressed as:
This formulation mirrors the encoder's recurrence but differs in a key way: the decoder's transformation incorporates the context variable as an additional input at every time step, ensuring that the encoded source sequence information continuously influences the generation process.
0
1
Updated 2026-05-14
Tags
D2L
Dive into Deep Learning @ D2L