torch.Tensor.index_add Tensor.index_add(dim, index, source, *, alpha=1) → Tensor Out-of-place version of .