tf.nest.is_nested

TensorFlow 1 version View source on GitHub

Returns true if its input is a collections.abc.Sequence (except strings).

tf.nest.is_nested(
    seq
)

Args:

  • seq: an input sequence.

Returns:

True if the sequence is a not a string and is a collections.abc.Sequence or a dict.