That is ok! But I still doubt if using X[a, b] to index a variable will influence the autograd. Is there any function to do this? I have seen someone said that scatter_add can achieve this goal, but I dont find the function in pytorch api doc.
Thanks!