torch.Tensor.index_put_
- Tensor.index_put_(indices, values, accumulate=False) → Tensor
Puts values from the tensor
into the tensor using the indices specified in (which is a tuple of Tensors). The expression is equivalent to . Returns .
Puts values from the tensor into the tensor using
the indices specified in (which is a tuple of Tensors). The
expression is equivalent to
. Returns .
selftensor.index_put_(indices, values)tensor[indices] = valuesselfIf accumulate is True, the elements in values are added to
self. If accumulate is False, the behavior is undefined if indices
contain duplicate elements.