(Deprecated) Export to Saved Model format
model_to_saved_model(
model,
saved_model_path,
custom_objects = NULL,
as_text = FALSE,
input_signature = NULL,
serving_only = FALSE
)
A Keras model to be saved. If the model is subclassed, the flag
serving_only
must be set to TRUE
.
a string specifying the path to the SavedModel directory.
Optional dictionary mapping string names to custom classes or functions (e.g. custom loss functions).
bool, FALSE
by default. Whether to write the SavedModel proto in text
format. Currently unavailable in serving-only mode.
A possibly nested sequence of tf.TensorSpec
objects, used to
specify the expected model inputs. See tf.function for more details.
bool, FALSE
by default. When this is true, only the
prediction graph is saved.
Invisibly returns the saved_model_path
.
Other saved_model:
model_from_saved_model()