<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/models/blob/v2.20.0/official/modeling/optimization/legacy_adamw.py) |

Adam optimizer with weight decay that exactly matches the original BERT.

## Classes

[`class AdamWeightDecay`](https://www.tensorflow.org/api_docs/python/tfm/optimization/legacy_adamw/AdamWeightDecay): Adam enables L2 weight decay and clip_by_global_norm on gradients.