Bendtorch.gn_fwd: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/main.bend as Bendtorch Lines 1940-1943 of bendtorch@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/main.bend&start_line=1940&end_line=1943 import Base import bend-ml-tensor-array@0.1.18.0/main.bend as TA def gn_fwd(+n: Nat, +hw: Nat, +ng: Nat, +cg: Nat, +eps: F32, p: LN, x: TA.Mat) -> Fwd, TA.Mat, TA.Mat>: match p x: case LN{TA.Mat{g}, TA.Mat{b}} TA.Mat{xa}: ln_f2(Nat.mul(n, hw), Nat.mul(ng, cg), gnf_images(Nat.sub(n, 1n), 0, ng, hw, U32.from_nat(Nat.mul(ng, cg)), cg, F32.from_nat(Nat.mul(hw, cg)), eps, R4{xa, g, b, zeros_a(Nat.mul(Nat.mul(n, hw), Nat.mul(ng, cg)))})) Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.from_nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.from_nat 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=Fwd https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=LN https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=R4 https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=gnf_images https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=ln_f2 https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=zeros_a