Hello
According to your code,  you are not passing  the vanilla input but rather an attentive input into your input gate which is of shape batch, hidden_size. The W_i which maps from input to hidden is of input, hidden, and therein lies the problem.
Also, based on a cursory reading of the paper, the dimension of the input vector and the attention vector should be the same, therefore, your W_a should be of size input, input and the U_a should be hidden, input. The line from the paper which suggests this is as follows -
The response of
an EleAttG is a vector at with the same dimension as the input xt of the RNNs,

Also I believe the author calculates the hardmat product instead of matrix multiplication to get the final xt which therefore would change to xt = at * xt