• Decode flat ArrayBuffer as weights.

    This function does not handle sharding.

    This function is the reverse of encodeWeights.

    Parameters

    • weightData: WeightData

      A flat ArrayBuffer or an array of ArrayBuffers carrying the binary values of the tensors concatenated in the order specified in specs.

    • specs: WeightsManifestEntry[]

      Specifications of the names, dtypes and shapes of the tensors whose value are encoded by buffer.

    Returns NamedTensorMap

    A map from tensor name to tensor value, with the names corresponding to names in specs.

    Error, if any of the tensors has unsupported dtype.