Thank you very much. The answer is very clear. The pytorch tutorial for chat bot 2 imploies Luong attention and it solves the unmatching dimension of dot align function problem by using summation on hidden dimension.