Bendtorch.ln_bwd: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/main.bend as Bendtorch Lines 1814-1817 of bendtorch@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/main.bend&start_line=1814&end_line=1817 import Base import bend-ml-tensor-array@0.1.18.0/main.bend as TA def ln_bwd(+n: Nat, +d: Nat, +eps: F32, p: LN, x: TA.Mat, dy: TA.Mat, gg: LN) -> Bwd, TA.Mat>: match p x dy: case LN{TA.Mat{g}, b} TA.Mat{xa} TA.Mat{da}: ln_b2(d, n, b, gg, lnb_rows(Nat.sub(n, 1n), 0, d, F32.from_nat(d), eps, R4B{xa, da, g, zeros_a(Nat.mul(n, d)), A2{zeros_a(d), zeros_a(d)}})) 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=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=A2 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 https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=R4B https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=ln_b2 https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=lnb_rows https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=zeros_a