torch.Tensor.Tensor.index_fill_
In-place version of index_fill. Fills elements of self at indices along dim with value.
Parameters
dimnumber- Dimension along which to index
indexTensor- 1D tensor with indices
valuenumber- Value to fill
Returns
this– This tensor modified in-place