A recurrent neural network (RNN) models ordered data as a sequence [X1, X2, …, Xt], rather than treating every input as independent. Recurrent connections create cycles that preserve a hidden internal state, allowing information from one time step to influence the next. section 4.3.2
Use an RNN when the order and dependencies between observations matter:
- Model time series or text, where later data points depend on earlier points. section 4.3 section 4.3.2
- Carry intermediate outputs forward as inputs for subsequent time steps through recurrent connections. section 4.3.2
- Prefer sequence-specific modeling over a fully connected network when temporal structure is relevant. section 4.3 section 4.3.2
Sequential image classification
A toy dog-versus-cat classifier can treat an image’s pixels as a sequence and replace fully connected hidden layers with a recurrent hidden layer. The example illustrates recurrence and memory, although the pixels are artificially treated as sequential data. section 4.3.2
Figure 4.16 Toy RNN model used to classify dog versus cat images by treating pixels of the input image as sequential data.
Trace the recurrent layer’s self-loop and the connections carrying information across time steps. section 4.3.2

















