sure!
The function I wrote is for one example in batch so attn_scores and indices are 1-d FloatTensor and 1d LongTensor.
But I want to implement a function that works for batch.(like scatter_add() in pytorch )
so attn_scores would be [batch_size, number of steps] 2d FloatTensor and indices also [batch_size, number of steps] 2d LongTensor
Thanks