-
Notifications
You must be signed in to change notification settings - Fork 603
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix how trainable args are counted for gradients in `GradientDescentO…
…ptimizer` and `NesterovMomentumOptimizer` (#1495) * count the trainable args, not simply the args * changelog * update nesterov opt too * update nesterov opt too * comment * changelog update * remove redundant enumerate * format * add another test for two trainable args * extract trainable args * enumerate trainable args * Update tests/test_optimize.py Co-authored-by: Josh Izaac <josh146@gmail.com> * Update tests/test_optimize.py Co-authored-by: Josh Izaac <josh146@gmail.com> * apply suggestion * add new test case * test docstring * Revert "apply suggestion" This reverts commit 386eb77. * format * remove extra dimensionality from non-trainable * create a fixture that returns a new optimizer object for each test case; the previous version left a state because the object lived on * format test * Update tests/test_optimize.py Co-authored-by: Josh Izaac <josh146@gmail.com>
- Loading branch information
1 parent
c0cdff2
commit 53e1dc8
Showing
4 changed files
with
123 additions
and
11 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