BendtorchFast.mom_leaf: def of bendtorch-fast@1.3.0.0 Import: import bendtorch-fast@1.3.0.0/main.bend as BendtorchFast Lines 59-63 of bendtorch-fast@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-fast@1.3.0.0/main.bend&start_line=59&end_line=63 import Base import bend-ml-tensor-fork@0.1.5.0/main.bend as TF import bendtorch@1.3.0.0/main.bend as T def mom_leaf(+op: T.Opt, +i0: U32, +cnt: Nat, r: TF.B3) -> TF.B3: match op r: case T.Momentum{+lr, +mu} TF.B3{w, g, m}: mom_b(T.mom_l(cnt, i0, lr, mu, Array.get(F32, w, i0), Array.get(F32, g, i0), Array.get(F32, m, i0))) case _ r: r Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.get 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=U32 https://jend.leeeet.dev/definition.txt?path=bend-ml-tensor-fork@0.1.6.0/main.bend&name=B3 https://jend.leeeet.dev/definition.txt?path=bendtorch-fast@1.3.0.0/main.bend&name=mom_b 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=mom_l