fn
scatter_amax_op
→TensorImplPtrint scatter_amax_op(const int & base, const int & indices, const int & src, int dim)Scatter with element-wise max reduction at duplicate indices.
Math
At each output slot , the result is the maximum among base[i]
and all src[j] with indices[j] == i.
See Also
scatter_amin_op : Same pattern with min reduction.
Parameters
base, indices, src, dimSame semantics as
scatter_add_op.Returns
TensorImplPtrReduced tensor, same shape and dtype as base.
Notes
Backward flows only through "winning" elements: when , else ; when , else . Ties distribute the gradient equally to all winners (matches the reference framework).