Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
The Deep Learning with PyTorch Workshop

You're reading from  The Deep Learning with PyTorch Workshop

Product type Book
Published in Jul 2020
Publisher Packt
ISBN-13 9781838989217
Pages 330 pages
Edition 1st Edition
Languages
Author (1):
Hyatt Saleh Hyatt Saleh
Profile icon Hyatt Saleh
Toc

LSTM Networks in PyTorch

The process of defining the LSTM network architecture in PyTorch is similar to that of any other neural network that we have discussed so far. However, it is important to note that, when dealing with sequences of data that are different from those of numbers, there is some preprocessing required in order to feed the network with data that it can understand and process.

Considering this, we need to explain the general steps for training a model to be able to take text data as inputs and retrieve a new piece of textual data. It is important to mention that not all the steps explained here are strictly required, but as a group, they make clean and reusable code for using LSTMs with textual data.

Preprocessing the Input Data

The first step is to load the text file into the code. This data will go through a series of transformations in order to be fed into the model properly. This is necessary because neural networks perform a series of mathematical computations...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime