Bahdanau (Additive) Attention

medium
Unit 13 · Attention & Normalization0/2 to milestone

Before dot-product attention, seq2seq models used additive attention: a small network scores how well each encoder state hjh_j matches the decoder state ss:

Pro problem

Unlock this and every premium problem across all tracks — plus hidden-test grading, advanced AI engineering modules and new content every week.

Start 7-day free trial
solution.py · Python 3.13
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Bahdanau (Additive) Attention · TechGradify