torch.Tensor.index_copy Tensor.index_copy(dim, index, tensor2) → Tensor torch.Tensor.index_copy_() 的独立版本。 或者更自然的表达方式: 与 torch.Tensor.index_copy_() 功能类似的独立版本。