RNN_tutorial icon indicating copy to clipboard operation
RNN_tutorial copied to clipboard

Recurrent neural networks: building a custom LSTM/GRU cell in PyTorch

AI SUMMER RNN tutorial

Blog post

  1. Recurrent neural networks: building a custom LSTM/GRU cell in PyTorch

  2. Recurrent Neural Networks: building GRU cells VS LSTM cells in Pytorch

Open in Collab

Article Summary

Are you interested to see how recurrent networks process sequences under the hood?

What are the advantages of RNN’s over transformers? When to use GRU’s over LSTM?

What are the equations of GRU really mean? How to build a GRU cell in Pytorch?

That’s what these articles are all about. We are going to inspect and build our own custom LSTM/GRU model. We test then in a trivial task of sine waves sequence predicion. Moreover, we make some comparisons between recurrent and convolutional modules, to maximize our understanding.

The first tutorial serves as an illustration of multiple concepts of recurrent neural networks and LSTM's. We carefully built upon the ideas, in order to understand sequence models that handle time-varying data. In the second part, we study GRU cells under the hood and analyze them side by side. This tutorials aim to bridge the gaps between RNN’s from people from various ML backgrounds.

Support

If you like this tutorial and find it useful, please consider (★) starring it, so that it can reach a broader audience.