Spec-Zone.ru › TensorFlow 1.15

tf.compat.v2.debugging.assert_type

Проверяет, что указанный Tensor имеет заданный тип.

tf.compat.v2.debugging.assert_type(
    tensor, tf_type, message=None, name=None
)

Это всегда можно проверить статически, поэтому этот метод ничего не возвращает.

Аргументы
tensor A Tensor.
tf_type Тип TensorFlow (dtypes.float32, tf.int64, dtypes.bool и т.д.).
message Строка, добавляемая в начало сообщения по умолчанию.
name Имя данной операции. По умолчанию "assert_type"
Исключения
TypeError Если тип данных тензора не совпадает с tf_type.

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/compat/v2/debugging/assert_type

Spec-Zone.ru

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