根据索引查找值
torch.gather() https://pytorch.org/docs/stable/generated/torch.gather.html#torch.gather
根据索引修改函数的值
torch.scatter() https://pytorch.org/docs/stable/generated/torch.Tensor.scatter_.html#torch.Tensor.scatter_