View source: R/layer-methods.R
get_config | R Documentation |
A layer config is an object returned from get_config()
that contains the
configuration of a layer or model. The same layer or model can be
reinstantiated later (without its trained weights) from this configuration
using from_config()
. The config does not include connectivity information,
nor the class name (those are handled externally).
get_config(object)
from_config(config, custom_objects = NULL)
object |
Layer or model object |
config |
Object with layer or model configuration |
custom_objects |
list of custom objects needed to instantiate the layer,
e.g., custom layers defined by |
get_config()
returns an object with the configuration,
from_config()
returns a re-instantiation of the object.
Objects returned from get_config()
are not serializable via RDS. If
you want to save and restore a model across sessions, you can use
save_model_config()
(for model configuration only, not weights)
or save_model()
to save the model configuration and weights
to the filesystem.
Other model functions:
get_layer()
get_state_tree()
keras_model()
keras_model_sequential()
pop_layer()
set_state_tree()
summary.keras.src.models.model.Model()
Other layer methods:
count_params()
get_weights()
quantize_weights()
reset_state()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.