Optional
convertedWhat library or tool is responsible for converting the original model to this format, applicable only if the model is output by a converter.
Used for debugging purposes. E.g., 'TensorFlow.js Converter v1.0.0'.
A value of null
means the model artifacts are generated without any
conversion process (e.g., saved directly from a TensorFlow.js
tf.LayersModel
instance.)
Optional
formatHard-coded format name for models saved from TensorFlow.js or converted by TensorFlow.js Converter.
Optional
generatedWhat library is responsible for originally generating this artifact.
Used for debugging purposes. E.g., 'TensorFlow.js v1.0.0'.
Optional
getReturns a stream of the weights. Some models are too large to fit in
V8's memory heap, and getWeightStream
loads their weights without storing
them all in memory at the same time.
Optional
initializerInputs and outputs signature for model initializer.
Optional
modelInitializer for the model.
Optional
modelModel topology.
For Keras-style tf.Model
s, this is a JSON object.
For TensorFlow-style models (e.g., SavedModel
), this is the JSON
encoding of the GraphDef
protocol buffer.
Optional
signatureInputs and outputs signature for saved model.
Optional
trainingSerialized configuration for the model's training.
Optional
userUser-defined metadata about the model.
Optional
weightBinary buffer(s) for all weight values in the order specified by
weightSpecs
. This may be a single ArrayBuffer of all the weights
concatenated together or an Array of ArrayBuffers containing the weights
(weights may be sharded across multiple ArrayBuffers).
Optional
weightWeight specifications.
This corresponds to the weightsData below.
The serialized artifacts of a model, including topology and weights.
The
modelTopology
,trainingConfig
,weightSpecs
andweightData
fields of this interface are optional, in order to support topology- or weights-only saving and loading.Note this interface is used internally in IOHandlers. For the file format written to disk as
model.json
, seeModelJSON
.