🧠 1. Recurrent Neural Networks (RNNs)
✅ Why Use RNNs?
- RNNs are designed for sequential data where order matters.
- Unlike CNNs, which are good at local spatial features, RNNs model dependencies over time.
- Perfect for:
- Natural language processing
- Time-series forecasting
- Speech recognition
✅ Problem it Solves:
- Captures temporal dependencies: Previous outputs influence future predictions.
- Models variable-length input sequences.
⚙️ How Does an RNN Solve This?
- RNNs share weights across time steps.
- Hidden state hₜ acts as memory:
h_t = f(W_{xh} x_t + W_{hh} h_{t-1} + b)
- This “loop” allows information to persist.
✅ Modes of RNNs:
- Many-to-One: Sentiment classification.
- One-to-Many: Image captioning.
- Many-to-Many: Machine translation, video classification.
🔥 2. Computing Loss & Backpropagation in RNNs