LSTM is a variant of RNN used in deep learning. You can use LSTMs if you are working on sequences of data.
Here are the most straightforward use-cases for LSTM networks you might be familiar with:
Before you start using LSTMs, you need to understand how RNNs work.
RNNs are neural networks that are good with sequential data. It can be video, audio, text, stock market time series or even a single image cut into a sequence of its parts.
Standard neural networks (convolutional or vanilla) have one major shortcoming when compared to RNNs - they cannot reason about previous inputs to inform later ones. You cannot solve some machine learning problems without some kind of memory of past inputs.
For example, you might run into a problem when you have some video frames of a ball moving and want to predict the direction of the ball. The way a standard neural network sees the problem is: you have a ball in one image and then you have a ball in another image.
#lstm #nlp #python #pytorch