torch.Tensor.index_put_¶
- Tensor.index_put_(indices, values, accumulate=False) Tensor¶
- Puts values from the tensor - valuesinto the tensor- selfusing the indices specified in- indices(which is a tuple of Tensors). The expression- tensor.index_put_(indices, values)is equivalent to- tensor[indices] = values. Returns- self.- If - accumulateis- True, the elements in- valuesare added to- self. If accumulate is- False, the behavior is undefined if indices contain duplicate elements.