Public Tensor Reductions #
Shape-polymorphic scalar reductions for ordinary tensor programs. Empty means use denominator one
(meanDenominator), the same totalized convention as meanSpec and the loss layer.
def
TorchLean.Tensor.maxAbs
{α : Type}
[Storage α]
[MathFunctions α]
[BEq α]
[Max α]
[Zero α]
{shape : Shape}
(tensor : Tensor α shape)
:
α
Largest absolute entry, or zero for an empty tensor. Self-unequal values are propagated:
for IEEE scalars this prevents a NaN from being hidden by the scalar max operation.