Bendtorch.ln_b2: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/main.bend as Bendtorch Lines 1809-1812 of bendtorch@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/main.bend&start_line=1809&end_line=1812 import Base import bend-ml-tensor-array@0.1.18.0/main.bend as TA def ln_b2(+d: Nat, -n: Nat, b: TA.Mat<1n, d>, gg: LN, s: R4B) -> Bwd, TA.Mat>: match gg s: case LN{ga, gb} R4B{x, dy, g, dx, A2{dg, db}}: gain_bwd_fin(n, d, LN, LN{TA.Mat{g}, b}, TA.Mat{dx}, LN{Mat.sum2(1n, d, ga, TA.Mat{dg}), Mat.sum2(1n, d, gb, TA.Mat{db})}) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=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=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=Mat.sum2 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=gain_bwd_fin