addons
addons copied to clipboard
Addition of MADGRAD Optimizer Algorithm
Description
The MADGRAD algorithm is a reliably high-performing non-convex optimization algorithm that matches or outperforms the SGD and Adam algorithms on a variety of image-to-image and language tasks. This PR includes a tensorflow-based implementation of the same.
Brief Description of the PR: The PR adds the MadGrad class as a sub-class of OptimizerV2 and tests related to it.
Fixes # (issue) #2452
Type of change
- [ ] Bug fix
- [ ] New Tutorial
- [ ] Updated or additional documentation
- [ ] Additional Testing
- [ ] New Activation and the changes conform to the activation contribution guidelines
- [ ] New Callback and the changes conform to the callback contribution guidelines
- [ ] New Image addition and the changes conform to the image op contribution guidelines
- [ ] New Layer and the changes conform to the layer contribution guidelines
- [ ] New Loss and the changes conform to the loss contribution guidelines
- [ ] New Metric and the changes conform to the metric contribution guidelines
- [X] New Optimizer and the changes conform to the optimizer contribution guidelines
- [ ] New RNN Cell and the changes conform to the rnn contribution guidelines
- [ ] New Seq2seq addition and the changes conform to the seq2seq contribution guidelines
- [ ] New Text addition and the changes conform to the text op contribution guidelines
Checklist:
- [X] I've properly formatted my code according to the guidelines
- [X] By running Black + Flake8
- [ ] By running pre-commit hooks
- [X] This PR addresses an already submitted issue for TensorFlow Addons
- [ ] I have made corresponding changes to the documentation
- [X] I have added tests that prove my fix is effective or that my feature works
- [ ] This PR contains modifications to C++ custom-ops
How Has This Been Tested?
Many tests for sparse and dense vector optimization have been performed. madgrad_test also includes a tf.keras-based example to help with design clarification. There are no tests for tf.keras.optimizers.schedules support, but this MadGrad implementation supports schedulers out of the box and the tests can be included if necessary.