Loading…
Glossary term
Long short-term memory: a type of recurrent network designed to remember information over longer sequences.
Long short-term memory networks add gates to a recurrent network. A forget gate decides what to drop, an input gate what to store and an output gate what to reveal, so useful information can survive across many steps.
They largely fixed the fading-memory problem of simple RNNs.
An LSTM layer in PyTorch
import torch.nn as nn
lstm = nn.LSTM(input_size=8, hidden_size=16, batch_first=True)LSTMs powered speech recognition and translation for years and remain useful for some time-series tasks.