Function getModelArtifactsForJSONSync

  • Create ModelArtifacts from a JSON file and weights.

    Parameters

    • modelJSON: ModelJSON

      Object containing the parsed JSON of model.json

    • OptionalweightSpecs: WeightsManifestEntry[]

      The list of WeightsManifestEntry for the model. Must be passed if the modelJSON has a weightsManifest.

    • OptionalweightData: WeightData

      An ArrayBuffer or array of ArrayBuffers of weight data for the model corresponding to the weights in weightSpecs. Must be passed if the modelJSON has a weightsManifest.

    Returns ModelArtifacts

    A Promise of the ModelArtifacts, as described by the JSON file.