NN blitz tutorial: some small improvements
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9.3k
- Forks
- 4.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 4
Description
I had some small suggestions for
https://pytorch.org/tutorials/beginner/blitz/neural_networks_tutorial.html
-
before the picture of the neural net, mention this is the famous "LeNet" example (and maybe give reference)
-
explain that the constructor only contains the layers with adjustable parameters,
and the deterministic layers only appear in forward() -
print(len(params)) gives the answer 10, but there are only 5 parameter blocks. Explain that the bias terms are treated separately.
-
"net.zero_grad(); out.backward(torch.randn(1, 10))" does not print anything, which makes one think there is something wrong. How about adding "print(params[1].grad)" and explain this is the gradient of the loss (evalyated at a random target vector) wrt the first layer bias vector.
-
The comment about batches should come before the statement "input = torch.randn(1, 1, 32, 32)" otherwise that is unclear
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
Start with the neural networks tutorial at https://pytorch.org/tutorials/beginner/blitz/neural_networks_tutorial.html and review each of the five suggested clarifications. Update the explanations and example ordering, add visible gradient output, and confirm the tutorial renders and the examples remain understandable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100