philipperemy/keras-attention
Keras Attention Layer (Luong and Bahdanau scores).
Implements both multiplicative (Luong) and additive (Bahdanau) attention mechanisms as a reusable Keras layer compatible with TensorFlow 2.0+, enabling dynamic focus on sequence elements. The layer accepts 3D sequential input and outputs attention-weighted context vectors, integrating seamlessly into RNN/LSTM architectures for tasks like machine translation and document classification. Includes model serialization support and visualization capabilities for interpreting attention weights across timesteps.
2,815 stars. Actively maintained with 1 commit in the last 30 days.
Stars
2,815
Forks
659
Language
Python
License
Apache-2.0
Category
Last pushed
Mar 12, 2026
Commits (30d)
1
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/ml-frameworks/philipperemy/keras-attention"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Related frameworks
tatp22/linformer-pytorch
My take on a practical implementation of Linformer for Pytorch.
thushv89/attention_keras
Keras Layer implementation of Attention for Sequential models
datalogue/keras-attention
Visualizing RNNs using the attention mechanism
ematvey/hierarchical-attention-networks
Document classification with Hierarchical Attention Networks in TensorFlow. WARNING: project is...
willGuimont/learnable_fourier_positional_encoding
Learnable Fourier Features for Multi-Dimensional Spatial Positional Encoding