The Math Behind Keras 3 Optimizers: Deep Understanding and Software | by Peng Qian | Aug, 2024

This can be a bit totally different from what the books say.

The Math Behind Keras 3 Optimizers: Deep Understanding and Application.
The Math Behind Keras 3 Optimizers: Deep Understanding and Software. Picture by DALL-E-3

Optimizers are a necessary a part of everybody working in machine studying.

Everyone knows optimizers decide how the mannequin will converge the loss perform throughout gradient descent. Thus, utilizing the proper optimizer can enhance the efficiency and the effectivity of mannequin coaching.

Apart from basic papers, many books clarify the rules behind optimizers in easy phrases.

Nevertheless, I just lately discovered that the efficiency of Keras 3 optimizers doesn’t fairly match the mathematical algorithms described in these books, which made me a bit anxious. I apprehensive about misunderstanding one thing or about updates within the newest model of Keras affecting the optimizers.

So, I reviewed the supply code of a number of widespread optimizers in Keras 3 and revisited their use instances. Now I wish to share this data to avoid wasting you time and provide help to grasp Keras 3 optimizers extra shortly.

In case you’re not very aware of the most recent modifications in Keras 3, right here’s a fast rundown: Keras 3 integrates TensorFlow, PyTorch, and JAX, permitting us to make use of cutting-edge deep studying frameworks simply via Keras APIs.