Previous chapters primarily dealt with models processing inputs where order wasn't the main focus, like classifying static images. This chapter shifts attention to data where sequence is significant, such as sentences in text or values over time in a time series. We will introduce Recurrent Neural Networks (RNNs), a type of neural network architecture specifically suited for processing sequential data.
You will learn how RNNs operate by maintaining an internal state, often called a hidden state, which allows them to 'remember' information from previous elements in a sequence when processing the current one. We'll start with the basic SimpleRNN
layer in Keras and examine its capabilities and limitations, including the vanishing gradient problem. Then, we will study more sophisticated variants like Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU) networks, which are designed to capture longer-range dependencies more effectively. You'll gain practical experience in preparing sequence data for these models and implementing RNNs and LSTMs using Keras for common tasks like text classification.
5.1 Introduction to Sequence Data
5.2 Recurrent Neural Network Concepts
5.3 SimpleRNN Layer in Keras
5.4 The Vanishing Gradient Problem
5.5 Long Short-Term Memory (LSTM) Networks
5.6 LSTM Layer in Keras
5.7 Gated Recurrent Units (GRUs)
5.8 Preparing Sequence Data for RNNs
5.9 Practice: Building an RNN/LSTM for Text Classification
© 2025 ApX Machine Learning