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

get_config

Layer/Model configuration


Description

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).

Usage

get_config(object)

from_config(config)

Arguments

object

Layer or model object

config

Object with layer or model configuration

Value

get_config() returns an object with the configuration, from_config() returns a re-instantation of hte object.

Note

Objects returned from get_config() are not serializable. Therefore, if you want to save and restore a model across sessions, you can use the model_to_json() or model_to_yaml() functions (for model configuration only, not weights) or the save_model_hdf5() function to save the model configuration and weights to a file.

See Also

Other layer methods: count_params(), get_input_at(), get_weights(), reset_states()


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.