Bendtorch.LinearNB: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/main.bend as Bendtorch Lines 2070-2071 of bendtorch@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/main.bend&start_line=2070&end_line=2071 import Base import bend-ml-tensor-array@0.1.18.0/main.bend as TA def LinearNB(+n: Nat, +i: Nat, +o: Nat, +par: Nat) -> Layer, TA.Mat, TA.Mat, TA.Mat>: Layer{w => x => lnb_f2(n, i, o, TA.Mat.matmul_nt(n, i, o, par, x, w)), w => s => dy => g => lnb_b2(n, i, o, par, s, g, TA.Mat.matmul_precise(n, o, i, par, dy, w)), op => p => g => st => mat_step(o, i, op, p, g, st), u => TA.Mat.zeros(o, i), p => Mat.dump(o, i, p), p => xs => off => Mat.restore(o, i, p, xs, off), p => xs => off => Mat.store(o, i, p, xs, off), u => U32.from_nat(Nat.mul(o, i))} Uses (14): 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=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=bend-ml-tensor-array@0.1.19.0/main.bend&name=Mat.matmul_nt https://jend.leeeet.dev/definition.txt?path=bend-ml-tensor-array@0.1.19.0/main.bend&name=Mat.matmul_precise https://jend.leeeet.dev/definition.txt?path=bend-ml-tensor-array@0.1.19.0/main.bend&name=Mat.zeros https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Layer https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Mat.dump https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Mat.restore https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Mat.store https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=lnb_b2 https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=lnb_f2 https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=mat_step