tensorflow:: ops:: AsString

#include <string_ops.h>

指定されたテンソルの各要素を文字列に変換します。

まとめ

多くの数値型とブール型をサポートしています。

Unicodeについては、[ https://www.tensorflow.org/tutorials/representation/unicode ](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)

議論:

オプション属性( Attrs参照):

  • 精度:浮動小数点数に使用する小数点以下の精度。精度が-1より大きい場合にのみ使用されます。
  • 科学的表記法:浮動小数点数には科学的表記法を使用してください。
  • 最短形式:浮動小数点数には、最短の表現形式(科学的表現または標準表現)を使用します。
  • width: 小数点以下の桁数をこの幅にパディングします。浮動小数点数と整数の両方に適用されます。width > -1 の場合にのみ使用されます。
  • fill: 幅が-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

出力

::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
)

ノード

::tensorflow::Node * node() const 

operator::tensorflow::Input

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const 

パブリック静的関数

埋める

Attrs Fill(
  StringPiece x
)

精度

Attrs Precision(
  int64 x
)

科学的

Attrs Scientific(
  bool x
)

最短

Attrs Shortest(
  bool x
)

幅

Attrs Width(
  int64 x
)