How georgeyiasemis/recurrent-neural-networks-from-scratch-using-pytorch works
This is an educational PyTorch library implementing recurrent cells and stacked or bidirectional sequence models from scratch. The principal workflow is that a caller supplies a batch of sequences to a model, the model iterates through time using the corresponding cell, and a linear head returns final-step predictions. The README also describes a training demo, but its source was not sampled, so it is not mapped here. The model excerpt is partial; edges are limited to relationships shown in the excerpt or documented in the README.
Main entry points: rnnmodels.py Bidirectional model · rnncells.py RNN cell
Components 9
Sequence models
- Simple RNN
rnnmodels.py - Stacked LSTM
rnnmodels.py - Stacked GRU
rnnmodels.py - Bidirectional model
rnnmodels.py - Linear output head
rnnmodels.py
Other components
- Model caller
Connections 18
- Model caller → Simple RNN: supplies sequence
README.md - Model caller → Stacked LSTM: supplies sequence
README.md - Model caller → Stacked GRU: supplies sequence
README.md - Model caller → Bidirectional model: supplies sequence
README.md - Simple RNN → RNN cell: calls per step
rnnmodels.py - Stacked LSTM → LSTM cell: calls per step
rnnmodels.py - Stacked GRU → GRU cell: calls per step
rnnmodels.py - Bidirectional model → RNN cell: selects by mode
rnnmodels.py - Bidirectional model → LSTM cell: selects by mode
rnnmodels.py - Bidirectional model → GRU cell: selects by mode
rnnmodels.py - Simple RNN → Linear output head: projects output
rnnmodels.py - Stacked LSTM → Linear output head: projects output
rnnmodels.py - Stacked GRU → Linear output head: projects output
rnnmodels.py - Bidirectional model → Linear output head: projects output
rnnmodels.py - Simple RNN → Model caller: returns prediction
README.md - Stacked LSTM → Model caller: returns prediction
README.md - Stacked GRU → Model caller: returns prediction
README.md - Bidirectional model → Model caller: returns prediction
README.md