Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

save_model_tf

Save/Load models using SavedModel format


Description

Save/Load models using SavedModel format

Usage

save_model_tf(
  object,
  filepath,
  overwrite = TRUE,
  include_optimizer = TRUE,
  signatures = NULL,
  options = NULL
)

load_model_tf(filepath, custom_objects = NULL, compile = TRUE)

Arguments

object

Model object to save

filepath

File path

overwrite

Overwrite existing file if necessary

include_optimizer

If TRUE, save optimizer's state.

signatures

Signatures to save with the SavedModel. Please see the signatures argument in tf$saved_model$save for details.

options

Optional tf$saved_model$SaveOptions object that specifies options for saving to SavedModel

custom_objects

Mapping class names (or function names) of custom (non-Keras) objects to class/functions (for example, custom metrics or custom loss functions). This mapping can be done with the dict() function of reticulate.

compile

Whether to compile the model after loading.

See Also


keras

R Interface to 'Keras'

v2.4.0
MIT + file LICENSE
Authors
Daniel Falbel [ctb, cph, cre], JJ Allaire [aut, cph], François Chollet [aut, cph], RStudio [ctb, cph, fnd], Google [ctb, cph, fnd], Yuan Tang [ctb, cph] (<https://orcid.org/0000-0001-5243-233X>), Wouter Van Der Bijl [ctb, cph], Martin Studer [ctb, cph], Sigrid Keydana [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.