Convert a flat dictionary of tensors into a nested object.
For example, take the case:
{ "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,}
This would become:
{ layers: [ { bias: b0, weight: w0 }, { bias: b1, weight: w1 }, ],} Copy
{ layers: [ { bias: b0, weight: w0 }, { bias: b1, weight: w1 }, ],}
Convert a flat dictionary of tensors into a nested object.
For example, take the case:
This would become: