Implementing an LSTM

Here we will discuss the details of the LSTM implementation. Though there are sublibraries in TensorFlow that have already implemented ready-to-go LSTMs, we will implement one from scratch. This will be very valuable, as in the real world there might be situations where you cannot use these off-the-shelf components directly. This code is available in the lstm_for_text_generation.ipynb exercise located in the ch8 folder of the exercises. However, we will also include an exercise where we will show how to use the existing TensorFlow RNN API that will be available in lstm_word2vec_rnn_api.ipynb, located in the same folder. Here we will discuss the code available in the lstm_for_text_generation.ipynb file.

First, we will discuss ...

Get Natural Language Processing with TensorFlow 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.