I am very sorry for my poor expression， if the value tensor is tensor([2, 9, 7, 8, 4])
the index is tensor([0, 0, 1, 2, 3])
I want to get a tensor : tensor([[2, 9], [7], [8], [4]]) or tensor([[2, 9], [7, 0], [8, 0], [4, 0]])
if there is still something that I did not let you understand, plz let me know, I will try another way  to express
maybe I need to create a zero tensor
tensor([[0., 0.],
[0., 0.],
[0., 0.]])
then the index tensor tensor([0, 0, 1, 2, 3]) is the row index