I’m sorry that I haven’t explain what the notations mean. I 'm just a student and rarely ask questions online.So 2 please forgive me for making the mistake.
I think s_{i-1} is the (i-1)-th hidden state of decoder, and h_{j} is the j-th output of encoder.But in the code, embeded[0] is the input embedding of this decoder cell, and hidden[0] is hidden output of last decoder cell. How can we caculate attention weight without the information of encoder? Maybe I misunderstood the meaning of notations…
Maybe only  the one who have read both paper and code can help me… Thanks a lot.