Learn R Programming

keras (version 2.13.0)

model_to_saved_model: (Deprecated) Export to Saved Model format

Description

(Deprecated) Export to Saved Model format

Usage

model_to_saved_model(
  model,
  saved_model_path,
  custom_objects = NULL,
  as_text = FALSE,
  input_signature = NULL,
  serving_only = FALSE
)

Value

Invisibly returns the saved_model_path.

Arguments

model

A Keras model to be saved. If the model is subclassed, the flag serving_only must be set to TRUE.

saved_model_path

a string specifying the path to the SavedModel directory.

custom_objects

Optional dictionary mapping string names to custom classes or functions (e.g. custom loss functions).

as_text

bool, FALSE by default. Whether to write the SavedModel proto in text format. Currently unavailable in serving-only mode.

input_signature

A possibly nested sequence of tf.TensorSpec objects, used to specify the expected model inputs. See tf.function for more details.

serving_only

bool, FALSE by default. When this is true, only the prediction graph is saved.

See Also

Other saved_model: model_from_saved_model()