jax-js
    Preparing search index...
    • Convert a nested object structure back into a flat dictionary of tensors.

      This is the inverse operation of toNested.

      For example:

      {
      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,
      }

      Parameters

      • nested: any
      • prefix: string = ""

      Returns { [key: string]: any }