torch.Tensor.index_add_
- Tensor.index_add_(dim, index, source, *, alpha=1) → Tensor
Accumulate the elements of
times into the tensor by adding to the indices in the order given in . For example, if , , and , then the th row of is subtracted from the th row of .