torch.Tensor.Tensor.index_add_
Tensor.index_add_(dim: number, index: Tensor, source: Tensor, options?: AlphaBetaOptions): thisTensor.index_add_(dim: number, index: Tensor, source: Tensor, alpha: number, options?: AlphaBetaOptions): thisIn-place version of index_add. Accumulates elements of source into self at positions specified by index.
Parameters
dimnumber- Dimension along which to index
indexTensor- 1D tensor with indices
sourceTensor- Source tensor with values to add
optionsAlphaBetaOptionsoptional
Returns
this– This tensor modified in-place