Bendtorch.acti_f3: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/main.bend as Bendtorch Lines 1053-1057 of bendtorch@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/main.bend&start_line=1053&end_line=1057 import Base import bend-ml-tensor-array@0.1.18.0/main.bend as TA # an activation whose derivative needs its input (silu, gelu): saves a copy of the input def acti_f3(~f: @+a: F32 -> F32, +n: Nat, +c: Nat, m: TA.MM2) -> Fwd, TA.Mat>: match m: case TA.MM2{x, s}: Fwd{Unit{}, Ew.map(~f, n, c, x), s} Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bend-ml-tensor-array@0.1.19.0/main.bend&name=MM2 https://jend.leeeet.dev/definition.txt?path=bend-ml-tensor-array@0.1.19.0/main.bend&name=Mat https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Ew.map https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Fwd