The dimensions of w j−1 andŝ j−1 are d. The attention score α j (i) is calculated as follows: The context vector c j for generating a targetlanguage sentence is calculated by The attentional vectorŝ j is calculated by using the context vector as follows: and then using the state of this hidden layer, the probability of the output word y j is given by where W c and W s represent weight matrices 3 .
the vertical axis represents a source sentence.