Bendtorch.Params.save: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/main.bend as Bendtorch Lines 3648-3651 of bendtorch@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/main.bend&start_line=3648&end_line=3651 import Base # every parameter of p, in dump order, into a file at path (Layer.count numbers), through one array def Params.save(~P: Type, ~X: Type, ~Y: Type, ~S: Type, ~m: Layer
, +path: String, p: P) -> IO(P): +n = Layer.count(P, X, Y, S, m) ps_fin(P, path, n, Layer.store(P, X, Y, S, m, p, Array.new(F32, depth(U32.to_nat(n)), 0.0), 0)) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.new https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat 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=Layer.count https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Layer.store https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=depth https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=ps_fin