torch.Tensor.index_put_#
- Tensor.index_put_(indices, values, accumulate=False) Tensor#
Puts values from the tensor
valuesinto the tensorselfusing the indices specified inindices(which is a tuple of Tensors). The expressiontensor.index_put_(indices, values)is equivalent totensor[indices] = values. Returnsself.If
accumulateisTrue, the elements invaluesare added toself. If accumulate isFalse, the behavior is undefined if indices contain duplicate elements.