Learn Before
Formula
RNN Encoder Hidden State Recurrence
Within a sequence-to-sequence encoder, an RNN processes the input sequence one token at a time. At each time step , the recurrent layer applies a transformation function that combines the input feature vector (derived from the token ) with the hidden state carried from the preceding time step to produce the updated hidden state :
This recurrence captures how the encoder incrementally builds a representation of the input sequence, with each hidden state encoding information about all tokens observed up to and including position .
0
1
Updated 2026-05-14
Tags
D2L
Dive into Deep Learning @ D2L