#133 · Primary category: Deep Learning Frameworks

keras-attention

attention-mechanism attention-model deep-learning keras keras-neural-networks

Keras Attention Layer (Luong and Bahdanau scores).

Project last updated:03/12/26

GitHub Stars

2.8K

Forks

648

Contributors

4

License

Apache-2.0

Why we included this project

For sequence-to-sequence work in Keras, this library wraps Luong and Bahdanau attention into a single layer you can plug into any model. You pick the scoring scheme by passing a string like 'luong' or 'bahdanau' to the constructor, then use it like any other Keras layer between your encoder and the output. The layer outputs the context vector and handles the custom-object registration needed to save and reload trained models, which is a real convenience when you're persisting checkpoints. It's intentionally small, but that focus is its strength: a compact, well-tested building block that doesn't pull in a whole framework.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category