0
$\begingroup$

I see two different ways of applying attention in seq2seq:

(a) the context vector (the weighted sum of encoder hidden states) fed into the output softmax, as shown in the diagram below. The diagram is from here.

from https://www.tensorflow.org/tutorials/text/nmt_with_attention.

(b) the context vector fed into the decoder input as shown the diagram below. The diagram is from here.

enter image description here

What are the pros and the cons of the two different approaches? Is there any paper comparing the two?

$\endgroup$
0
$\begingroup$

(a) is Luong's attention mechanism (link) while (b) is Bahdanau's mechanism (link)

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.