torch.Tensor.index_put_#
- Tensor.index_put_(indices,values,accumulate=False)→Tensor#
Puts values from the tensor
valuesinto the tensorselfusingthe indices specified inindices(which is a tuple of Tensors). Theexpressiontensor.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 indicescontain duplicate elements.