misleading variable name in transformer tutorial
Open
Nobody has claimed this yet.
intro
- Dominant language
- Python
- Stars
- 9.3k
- Forks
- 4.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 4
Description
https://github.com/pytorch/tutorials/blob/master/beginner_source/transformer_tutorial.py#L300
batch_size is a bad variable name, because it is not the dimension usually referred to as the batch size.. Instead, it is the sequence length associated with a particular batch. I suggest using batch_seq_len for clarity.
cc @suraj813
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open beginner_source/transformer_tutorial.py around line 300 and inspect the variable named batch_size. Rename it to batch_seq_len consistently, then verify the tutorial no longer uses the misleading name for this sequence-length value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100