ZeroDivisionError: float division by zero
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9k
- Forks
- 1.5k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 3
Description
I trained my model whith the loss decrease quickly. I encountered the "ZeroDivisionError: float division by zero" exception at the following place. I think it should somehow handle the case, though it is weird.
https://github.com/NVIDIA/apex/blob/b9e5d37dbdbfbf5596acce3b915acf4b1a93a789/apex/amp/scaler.py#L183
Contributor guide
No contributing guide indexed for this repository
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 at apex/amp/scaler.py line 183 and reproduce the ZeroDivisionError with the reported training condition. Trace the scaler calculation to determine the expected zero-loss behavior; done means the condition no longer raises unexpectedly and a regression check covers it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100