Long short-term memory in Keras

As we said in Chapter 6, Movie Reviews Sentiment Analysis Using Recurrent Neural Networks, LSTM is a particular architecture of RNN.

RNNs are based on the need to preserve a memory of past events; this behavior is not possible with normal networks, and that is why RNNs are used in areas where the classic networks do not produce results, such as the prediction of time series (weather, quotations, and so on) that refer to previous data.

An LSTM network consists of cells (LSTM blocks) that are linked together. Each cell is, in turn, composed of three types of ports: input gate, output gate, and forget gate. They implement the write, read, and reset functions on the cell memory, respectively.

So, the LSTM modules ...

Get Keras 2.x Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.