BendtorchGpu.ln_step2: def of bendtorch-gpu@1.3.0.0 Import: import bendtorch-gpu@1.3.0.0/main.bend as BendtorchGpu Lines 556-560 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=556&end_line=560 import Base import bend-ml-tensor-array@0.1.18.0/main.bend as TA import bendtorch@1.3.0.0/main.bend as T # the gain and the bias take this file's optimizer step, as Linear's two matrices do def ln_step2(+d: Nat, +op: T.Opt, p: T.LN, g: T.LN, st: T.Two>, T.OptState>>) -> T.Step>: match p g st: case T.LN{w, b} T.LN{gw, gb} T.Two{sw, sb}: T.ln_s2(d, opt_mat(1n, d, op, w, gw, sw), opt_mat(1n, d, op, b, gb, sb)) Uses (9): 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-gpu@1.3.0.0/main.bend&name=opt_mat 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=Opt https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=OptState https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Step https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Two https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=ln_s2