scatter_add(operand, scatter_indices, updates, dimension_numbers, *, indices_are_sorted=False, unique_indices=False)¶
Wraps XLA’s Scatter operator, where addition is used to combine updates and values from operand.
The semantics of scatter are complicated and its API is subject to change.
Any) – an array to which the scatter should be applied
Any) – an array that gives the indices in operand to which each update in updates should be applied.
Any) – the updates that should be scattered onto operand.
ScatterDimensionNumbers) – a lax.ScatterDimensionNumbers object that describes how dimensions of operand, start_indices, updates and the output relate.
bool) – whether scatter_indices is known to be sorted. If true, may improve performance on some backends.
bool) – whether the indices to be updated in
operandare guaranteed to not overlap with each other. If true, may improve performance on some backends.
- Return type
An array containing the sum of operand and the scattered updates.