View source on GitHub
|
Checks if a given structure is nested.
tf.keras.tree.is_nested(
structure
)
Examples:
keras.tree.is_nested(42)Falsekeras.tree.is_nested({"foo": 42})True
Args | |
|---|---|
structure
|
A structure to check. |
Returns | |
|---|---|
True if a given structure is nested, i.e. is a sequence, a mapping,
or a namedtuple, and False otherwise.
|
View source on GitHub