tf.compat.as_str_any
Преобразует входной параметр в тип str.
tf.compat.as_str_any(
value, encoding='utf-8'
)
Использует str(value), за исключением входных параметров типа bytes, которые преобразуются с помощью as_str.
| Аргументы | |
|---|---|
value | Объект, который можно преобразовать в str. |
encoding | Кодировка для входных параметров типа bytes. |
| Возвращает | |
|---|---|
Объект типа str. |
© 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/compat/as_str_any