View source on GitHub |
Serializes model
as a TensorFlow SavedModel to path
.
tff.learning.models.save(
model: tff.learning.models.VariableModel
,
path: str,
input_type=None
) -> None
The resulting SavedModel will contain the default serving signature, which can be used with the TFLite converter to create a TFLite flatbuffer for inference.
Args | |
---|---|
model
|
The tff.learning.models.VariableModel to save.
|
path
|
The str directory path to serialize the model to.
|
input_type
|
An optional structure of tf.TensorSpec s representing the
expected input of model.predict_on_batch , to override reading from
model.input_spec . Typically this will be similar to model.input_spec ,
with any example labels removed. If None, default to
model.input_spec['x'] if the input_spec is a mapping, otherwise default
to model.input_spec[0] .
|