tensorflow::ops::AsString

#include <string_ops.h>

Converts each entry in the given tensor to strings.

Summary

Supports many numeric types and boolean.

For Unicode, see the [https://www.tensorflow.org/tutorials/representation/unicode](Working with Unicode text) tutorial.

Examples:

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)

Arguments:

Optional attributes (see Attrs):

  • precision: The post-decimal precision to use for floating point numbers. Only used if precision > -1.
  • scientific: Use scientific notation for floating point numbers.
  • shortest: Use shortest representation (either scientific or standard) for floating point numbers.
  • width: Pad pre-decimal numbers to this width. Applies to both floating point and integer numbers. Only used if width > -1.
  • fill: The value to pad if width > -1. If empty, pads with spaces. Another typical value is '0'. String cannot be longer than 1 character.

Returns:

Constructors and Destructors

AsString(const ::tensorflow::Scope & scope, ::tensorflow::Input input)
AsString(const ::tensorflow::Scope & scope, ::tensorflow::Input input, const AsString::Attrs & attrs)

Public attributes

operation
output

Public functions

node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const

Public static functions

Fill(StringPiece x)
Precision(int64 x)
Scientific(bool x)
Shortest(bool x)
Width(int64 x)

Structs

tensorflow::ops::AsString::Attrs

Optional attribute setters for AsString.

Public attributes

operation

Operation operation

output

::tensorflow::Output output

Public functions

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 

Public static functions

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
)