Spec-Zone.ru › TensorFlow

tf.keras.tree.is_nested

Проверяет, является ли заданная структура вложенной.

tf.keras.tree.is_nested(
    structure
)

Примеры:

keras.tree.is_nested(42)
False
keras.tree.is_nested({"foo": 42})
True
Аргументы
structure Структура для проверки.
Возвращает
`True` если заданная структура является вложенной, т.е. является последовательностью, отображением или namedtuple, и `False` в противном случае.

© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/keras/tree/is_nested

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API