Bendtorch.Opt.at: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/main.bend as Bendtorch Lines 457-468 of bendtorch@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/main.bend&start_line=457&end_line=468 import Base def Opt.at(+cfg: OptCfg, +q1: F32, +q2: F32) -> Opt: match cfg: case CSGD{lr}: SGD{lr} case CMomentum{lr, mu}: Momentum{lr, mu} case CAdam{lr, b1, b2, eps, wd, c1, c2}: Adam{lr, b1, b2, eps, wd, False{}, (lr / q1 : F32), F32.sqrt(q2), c1, c2} case CAdamW{lr, b1, b2, eps, wd, c1, c2}: Adam{lr, b1, b2, eps, wd, True{}, (lr / q1 : F32), F32.sqrt(q2), c1, c2} case CAdamWBF16{lr, b1, b2, eps, wd, c1, c2, v16}: Adam{lr, b1, b2, eps, wd, True{}, (lr / q1 : F32), F32.sqrt(q2), c1, c2} Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.sqrt 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=OptCfg