Overview
This section explains the modular design of ArrayLSTM on a high level. Figure 1 provides an overview of the different modules used in the ArrayLSTM implementation.
All LSTM variants are subclasses of the nn.Module
class.
Therefore, they all implement the forward(X, hidden)
method.
Or alternatively, the class implements the __call__()
method, which subsequently calls the forward(X, hidden)
method.
Figure 2 gives an overview of how the forward method is implemented.
Note that the dashed block update_hidden()
is only called in the ArrayLSTM variants, not the regular LSTM.