Convert a nested object structure back into a flat dictionary of tensors.
This is the inverse operation of toNested.
toNested
For example:
{ layers: [ { bias: b0, weight: w0 }, { bias: b1, weight: w1 }, ],} Copy
{ layers: [ { bias: b0, weight: w0 }, { bias: b1, weight: w1 }, ],}
Would become:
{ "layers.0.bias": b0, "layers.0.weight": w0, "layers.1.bias": b1, "layers.1.weight": w1,} Copy
{ "layers.0.bias": b0, "layers.0.weight": w0, "layers.1.bias": b1, "layers.1.weight": w1,}
Convert a nested object structure back into a flat dictionary of tensors.
This is the inverse operation of
toNested.For example:
Would become: