pytorch: tensors used as indices 用tensor索引另一个tensor
tensor1[tensor2]刚看到这个结构有点懵,不知道它是具体怎么工作的example.pya=torch.arange(16)b=torch.tensor([2,2,0,1,0,0,1,0,2,1,0,0,1,0,0,0],dtype=torch.uint8)print(a)print(b)print(a[b])index_list=[[4,3,2,1,0]]c=torch.LongTen