Spec-Zone.ru › TensorFlow C++ 2.3

tensorflow::ops::AsString

#include <string_ops.h>

Преобразует каждое значение в заданном тензоре в строку.

Summary

Поддерживает множество числовых типов и булево значение.

Для Юникода см. учебник по [https://www.tensorflow.org/tutorials/representation/unicode](Работа с текстом Юникода).

Примеры:

tf.strings.as_string([3, 2]) tf.strings.as_string([3.1415926, 2.71828], precision=2).numpy() array([b'3.14', b'2.72'], dtype=object)

Аргументы:

  • scope: Объект Scope

Дополнительные атрибуты (см. Attrs):

  • precision: Постобразная точность, используемая для чисел с плавающей точкой. Используется только если precision > -1.
  • scientific: Использовать научную запись для чисел с плавающей точкой.
  • shortest: Использовать кратчайшее представление (либо научную, либо стандартную) для чисел с плавающей точкой.
  • width: Заполнить числа до указанной ширины. Применяется как к числам с плавающей точкой, так и к целым числам. Используется только если width > -1.
  • fill: Значение для заполнения, если width > -1. Если пусто, заполняется пробелами. Другое распространенное значение — '0'. Строка не может быть длиннее одного символа.

Возвращает:

  • Output: Результирующий тензор.
Конструкторы и деструкторы
AsString(const ::tensorflow::Scope & scope, ::tensorflow::Input input)
AsString(const ::tensorflow::Scope & scope, ::tensorflow::Input input, const AsString::Attrs & attrs)
Публичные атрибуты
operation
Operation
output
::tensorflow::Output
Публичные функции
node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Публичные статические функции
Fill(StringPiece x)
Attrs
Precision(int64 x)
Attrs
Scientific(bool x)
Attrs
Shortest(bool x)
Attrs
Width(int64 x)
Attrs
Структуры
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
)

© 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/cc/class/tensorflow/ops/as-string

Spec-Zone.ru

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