-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Small changes to net that make grad accumulation easier (#516)
* Small changes to net that make grad accumulation easier * Move some lines around for less indentation * Correct wrong implementation of gradient accumulation loss.backward() needs to be called for each batch. * Divide loss at the correct place. * Improve and fix test for gradient accumulation Test different accumulation step sizes, fix a bug in calculating expected number. * Add entry to FAQ for how to do gradient accumulation * Entry to CHANGES.md * Use correct class name in FAQ example * Remove unnecessary check
- Loading branch information
1 parent
a361bc1
commit a62e419
Showing
4 changed files
with
102 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters