Learn Before
Concept

Concat Attention Function

This is the third type of multiplicative attention. Here you can see the formula of that:

score(h,ht)=VaTtanh(Wa[h,ht]) score(h, h'_{t}) = V^{T}_{a} * tanh( W_{a} * [h, h'_{t}] )

hh - encoder vector hth'_{t} - decoder vector

So first we concatenate the encoder and decoder state. And we just add a usual Dense layer with tanh activation to the input and also add a layer with one unit to represent the score. So as we train this mechanism actually learn which words are most influential for the output words.

0

1

Updated 2020-10-10

Tags

Data Science