def Softmax
import bendtorch@1.3.0.0/main.bend as Bendtorchimport Base
import bend-ml-tensor-array@0.1.18.0/main.bend as TA
1447# softmax over each row; saves its output
1448def Softmax(+n: Nat, +c: Nat) -> Layer<Unit, TA.Mat<n, c>, TA.Mat<n, c>, TA.Mat<n, c>>:
1449 Layer{p => x => sm_fwd(n, c, x), p => s => dy => g => sm_bwd(n, c, s, dy), op => p => g => st => no_step(Unit, op, p, g, st), u => Unit{}, p => PL{p, Nil{}}, p => xs => off => PA{p, xs, off}, p => xs => off => PA{p, xs, off}, u => 0}
Uses (10)
Used by (0)
No other definition uses this definition.