def Weights.of_flat
import bend-tensors@0.0.0.2/bend_tensors.bend as BendTensorsimport Base
1734# a Flat's floats copied into the weight registry; the Flat is consumed
1735def Weights.of_flat(+rows: Nat, +cols: Nat, m: Flat<rows, cols>) -> IO(Weights<rows, cols>):
1736 FlatS{a} = m
1737 IO.bind(U32, Weights<rows, cols>, IO.try(U32, Weights.of_array.eff(a, (U32.from_nat(rows) * U32.from_nat(cols) : U32))), id => Weights.wrap(rows, cols, id))
Uses (11)
Used by (0)
No other definition uses this definition.