def VecT.softmax

bend-tensors@0.0.0.2 · bend_tensors.bend:649

import bend-tensors@0.0.0.2/bend_tensors.bend as BendTensors
import Base

649# exp(v - max v) / sum
650def VecT.softmax(+n: Nat, +v: VecT(n)) -> VecT(n):
651  VecT.softmax.fin(n, VecT.exp(n, VecT.shift(n, (0.0 - VecT.max(n, v) : F32), v)))

Uses (8)

Used by (0)

No other definition uses this definition.