If I have a tensor A [1,5,3], then I perform shuffle operation, like torch.randperm(len(A)) and get shuffled index [2,1,0]. Then I shuffle A according to shuffled index, the resulted tensor is [3, 5, 1]. but how can I get original tensor ([1,5,3])? Is there any reverse shuffle function of pytorch? I know I can assign elements according to shuffled index, but it’s very slow. Can anybody help me? Thank you very much!!!