-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TF2.2 compatib, usage changes, code cleanup
**FEATURES**: - Compatibility with TF 2.2 (other versions still compatible, but no longer tested) - `eta_t` now behaves deterministically, updating after `t_cur` (previously, behavior was semi-random) - Lots of code cleanup **USAGE NOTES**: - `t_cur` should now be set to `-1` instead of `0` to restart `eta_t` - `t_cur` should now be set at `iters == total_iterations - 2`; explanation [here](https://github.com/OverLordGoldDragon/keras-adamw/blob/master/tests/test_optimizers.py#L53) - `total_iterations` must now be `> 1`, instead of only `> 0` - `total_iterations <= 1` will force `weight_decays` and `lr_multipliers` to `None` **FIXES**: - Optimizers will no longer zero layer penalties if weight decays cannot be applied (i.e. `total_iterations` is not `> 1`) - `eta_t` is now properly updated as a `tf.Variable`, instead of being an update `tf.Tensor` - Testing didn't actually include Eager in last version - now does **BREAKING**: - `utils_225tf.py` removed - `utils_common.py` removed - `optimizers_tfpy.py` removed - `utils.py` code is now that of `utils_225tf.py` - `utils_common.py` merged with `utils.py` - `self.batch_size` is now an `int`, instead of `tf.Variable` **MISC**: - `tests`: `/test_optimizers`, `/test_optimizers_225`, `/test_optimizers_225tf`, `test_optimizers_v2`, `test_optimizers_tfpy` removed - All tests now done in single file: `tests/test_optimizers.py` - `_update_t_cur_eta_t` and `_update_t_cur_eta_t_apply_lr_mult` added to `utils.py` - Updated `examples.py` and related parts in README
- Loading branch information
1 parent
c5f1e8f
commit d55194b
Showing
28 changed files
with
785 additions
and
2,515 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
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
Oops, something went wrong.