torch.Tensor.index_reduce_
- Tensor.index_reduce_(dim, index, source, reduce, *, include_self=True) → Tensor
Accumulate the elements of
into the tensor by accumulating to the indices in the order given in using the reduction given by the argument. For example, if , , and then the th row of is multiplied by the th row of . If , the values in the tensor are included in the reduction, otherwise, rows in the tensor that are accumulated to are treated as if they were filled with the reduction identities.