Retrieves a layer based on either its name (unique) or index.

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)

Arguments

object

Keras model object

name

String, name of layer.

index

Integer, index of layer (0-based)

Value

A layer instance.

See also