tf.debugging.assert_type
| Просмотреть исходный код на GitHub |
Проверяет, что заданный Tensor имеет указанный тип.
tf.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/r2.3/api_docs/python/tf/debugging/assert_type