tensorflow::ops::AsString
#include <string_ops.h>
Преобразует каждый элемент заданного тензора в строку.
Краткое описание
Поддерживает множество числовых типов и логический тип.
Информацию о Unicode см. в руководстве [https://www.tensorflow.org/tutorials/representation/unicode](Работа с текстом Unicode).
Примеры:
tf.strings.as_string([3, 2])
Аргументы:
- scope: объект Scope
Необязательные атрибуты (см. Attrs):
- precision: Количество знаков после запятой для чисел с плавающей точкой. Используется только при precision > -1.
- scientific: Использовать научную нотацию для чисел с плавающей точкой.
- shortest: Использовать кратчайшее представление (научную или стандартную нотацию) для чисел с плавающей точкой.
- width: Дополнять числа до запятой нулями до указанной ширины с помощью Pad. Применяется к числам с плавающей точкой и целым числам. Используется только при width > -1.
- fill: Значение для заполнения, если width > -1. Если значение пустое, заполнение выполняется пробелами. Другое типичное значение — '0'. Длина строки не может превышать 1 символ.
Возвращает:
-
Output: выходной тензор.
| Конструкторы и деструкторы | |
|---|---|
AsString(const ::tensorflow::Scope & scope, ::tensorflow::Input input) | |
AsString(const ::tensorflow::Scope & scope, ::tensorflow::Input input, const AsString::Attrs & attrs) |
| Открытые атрибуты | |
|---|---|
operation | |
output | |
| Открытые функции | |
|---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const | |
| Открытые статические функции | |
|---|---|
Fill(StringPiece x) | |
Precision(int64 x) | |
Scientific(bool x) | |
Shortest(bool x) | |
Width(int64 x) | |
| Структуры | |
|---|---|
| tensorflow::ops::AsString::Attrs | Методы задания необязательных атрибутов для AsString. |
Открытые атрибуты
operation
Operation operation
output
::tensorflow::Output output
Открытые функции
AsString
AsString( const ::tensorflow::Scope & scope, ::tensorflow::Input input )
AsString
AsString( const ::tensorflow::Scope & scope, ::tensorflow::Input input, const AsString::Attrs & attrs )
node
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Открытые статические функции
Fill
Attrs Fill( StringPiece x )
Precision
Attrs Precision( int64 x )
Scientific
Attrs Scientific( bool x )
Shortest
Attrs Shortest( bool x )
Width
Attrs Width( int64 x )
© 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/cc/class/tensorflow/ops/as-string