torch.Tensor.Tensor.index_copy_
In-place version of index_copy. Copies elements from source into self at positions specified by index.
Parameters
dimnumber- Dimension along which to index
indexTensor- 1D tensor with indices
sourceTensor- Source tensor with values to copy
Returns
this– This tensor modified in-place