graykode / graykode/nlp-tutorial
The comment in the Bi-LSTM (Attention) model has an issue.
- Dominant language
- Jupyter Notebook
- Stars
- 14.9k
- Forks
- 3.9k
- PR merge metrics
- No merged PRs in 30d
Description
The comment `# output : [batch_size, len_seq, n_hidden]` should indeed be corrected to `# output : [batch_size, len_seq, n_hidden*2]` because the Bi-LSTM model is bidirectional. In a bidirectional LSTM, the hidden size is effectively doubled, as it concatenates the forward and backward hidden states. Therefore, the correct shape of the `output` after permutation is `[batch_size, len_seq, n_hidden * 2]`.
Contributor guide
Research direction
Locate the Bi-LSTM (Attention) model notebook and read the surrounding output permutation code and comment. Correct the documented output shape to include the bidirectional hidden size, then verify that the comment matches the model's actual output dimensions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, pytorch
- Domain
- machine-learning
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100