nn_tutorial.py loss and accuracy being measured only on last mini-batch as opposed to entire batch, which may be confusing for learners
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9.3k
- Forks
- 4.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 4
Description
The tutorial tests loss and accuracy with
print(loss_func(model(xb), yb), accuracy(model(xb), yb))
which is ok but only measures those functions on the last mini-batch used in training, which is somewhat arbitrary and may be counter-intuitive to learners.
I suggest replacing all instances of loss_func and accuracy calls by
loss_func(model(x_train), y_train)
and
accuracy(model(x_train), y_train))
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 nn_tutorial.py and locate all loss_func and accuracy calls. Compare the current mini-batch inputs with the suggested x_train and y_train inputs, then update the tutorial's measurements so they evaluate the full training data. Done means the relevant displayed loss and accuracy values no longer depend only on the last mini-batch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation, machine-learning
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100