BendtorchGpu.gn_b: def of bendtorch-gpu@1.3.0.0 Import: import bendtorch-gpu@1.3.0.0/main.bend as BendtorchGpu Lines 552-554 of bendtorch-gpu@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-gpu@1.3.0.0/main.bend&start_line=552&end_line=554 import Base import bend-ml-tensor-array@0.1.18.0/main.bend as TA import bend-ml-tensor-gpu@0.1.5.0/main.bend as TG import bendtorch@1.3.0.0/main.bend as T def gn_b(+n: Nat, +hw: Nat, +ng: Nat, +cg: Nat, +eps: F32, p: T.LN, x: TA.Mat, dy: TA.Mat, gacc: T.LN) -> T.Bwd, TA.Mat>: match p x dy gacc: case T.LN{TA.Mat{g}, b} TA.Mat{xa} TA.Mat{da} T.LN{TA.Mat{ga}, TA.Mat{gb}}: gn_b2(n, hw, ng, cg, b, ga, gb, TG.run2_new(~EGN, ~lf_gnb, TA.cap_depth(Nat.mul(n, ng)), egn(n, hw, ng, cg, eps), xa, da, g, nn(Unit{}), TA.cap_depth(Nat.mul(Nat.mul(n, hw), Nat.mul(ng, cg))), TA.cap_depth(Nat.mul(2n, Nat.mul(n, ng))))) Uses (14): 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=Nat.mul 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=Mat https://jend.leeeet.dev/definition.txt?path=bend-ml-tensor-array@0.1.19.0/main.bend&name=cap_depth https://jend.leeeet.dev/definition.txt?path=bend-ml-tensor-gpu@0.1.5.1/main.bend&name=run2_new https://jend.leeeet.dev/definition.txt?path=bendtorch-gpu@1.3.0.0/main.bend&name=EGN https://jend.leeeet.dev/definition.txt?path=bendtorch-gpu@1.3.0.0/main.bend&name=egn https://jend.leeeet.dev/definition.txt?path=bendtorch-gpu@1.3.0.0/main.bend&name=gn_b2 https://jend.leeeet.dev/definition.txt?path=bendtorch-gpu@1.3.0.0/main.bend&name=lf_gnb https://jend.leeeet.dev/definition.txt?path=bendtorch-gpu@1.3.0.0/main.bend&name=nn https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Bwd https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=LN