Indices are based on order of horizontal graph traversal (bottom-up) and are
1-based. If name
and index
are both provided, index
will take
precedence.
get_layer(object, name = NULL, index = NULL)
A layer instance.
Keras model object
String, name of layer.
Integer, index of layer (1-based). Also valid are negative values, which count from the end of model.
Other model functions:
get_config()
get_state_tree()
keras_model()
keras_model_sequential()
pop_layer()
set_state_tree()
summary.keras.src.models.model.Model()