def Flat.softmax.row3
import bend-tensors@0.0.0.2/bend_tensors.bend as BendTensorsimport Base
1955# one row of softmax: max, exp and sum, scale
1956def Flat.softmax.row3(+n: Nat, +base: U32, r: Array<F32> & F32) -> Array<F32>:
1957 (a, s) = r
1958 Flat.rowscale.go(n, base, F32.div(1.0, s), a)