Description Usage Arguments Value Note See Also
View source: R/model-persistence.R
Model objects are external references to Keras objects which cannot be saved
and restored across R sessions. The serialize_model()
and
unserialize_model()
functions provide facilities to convert Keras models to
R objects for persistence within R data files.
1 2 3 | serialize_model(model, include_optimizer = TRUE)
unserialize_model(model, custom_objects = NULL, compile = TRUE)
|
model |
Keras model or R "raw" object containing serialized Keras model. |
include_optimizer |
If |
custom_objects |
Mapping class names (or function names) of custom (non-Keras) objects to class/functions (for example, custom metrics or custom loss functions). |
compile |
Whether to compile the model after loading. |
serialize_model()
returns an R "raw" object containing an hdf5
version of the Keras model. unserialize_model()
returns a Keras model.
The save_model_hdf5()
function enables saving Keras models to
external hdf5 files.
Other model persistence:
get_weights()
,
model_to_json()
,
model_to_yaml()
,
save_model_hdf5()
,
save_model_tf()
,
save_model_weights_hdf5()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.