graykode / graykode/nlp-tutorial
The comment in the Bi-LSTM (Attention) model has an issue.
Ouverte
- Langage dominant
- Jupyter Notebook
- Étoiles
- 14.9k
- Forks
- 3.9k
- Métriques de merge des PR
- Aucune PR mergée en 30 j
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]`.
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.