tensorflow::ops::AsString
#include <string_ops.h>
Преобразует каждое значение в заданном тензоре в строку.
Краткое описание
Поддерживает многие числовые типы и булевы значения.
Для работы с Юникодом см. учебник [https://www.tensorflow.org/tutorials/representation/unicode](Работа с текстом Unicode).
Примеры:
tf.strings.as_string([3, 2])
Аргументы:
- scope: Объект Scope
Дополнительные атрибуты (см. Attrs):
- precision: Постозначающая точность для чисел с плавающей точкой. Используется только если precision > -1.
- scientific: Использовать научную запись для чисел с плавающей точкой.
- shortest: Использовать кратчайшее представление (научную или стандартную запись) для чисел с плавающей точкой.
- width: Заполнить числа до указанной ширины перед десятичной точкой. Применяется к числам с плавающей точкой и целым числам. Используется только если 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 )
Точность
Attrs Precision( int64 x )
Научная запись
Attrs Scientific( bool x )
Кратчайшее
Attrs Shortest( bool x )
Ширина
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/versions/r2.9/api_docs/cc/class/tensorflow/ops/as-string