コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
テンソルフロー::作戦::文字列として
#include <string_ops.h>
指定されたテンソルの各エントリを文字列に変換します。
まとめ
多くの数値型とブール値をサポートします。
Unicode については、[ https://www.tensorflow.org/tutorials/representation/unicode ](Unicode テキストの操作) チュートリアルを参照してください。
引数:
オプションの属性 ( Attrs
を参照):
- precision: 浮動小数点数に使用する 10 進数以降の精度。精度 > -1 の場合にのみ使用されます。
- Scientific: 浮動小数点数に科学表記を使用します。
- 最短: 浮動小数点数の最短表現 (科学的または標準) を使用します。
- width: 10 進数より前の数値をこの幅に埋め込みます。浮動小数点数と整数の両方に適用されます。幅 > -1 の場合にのみ使用されます。
- fill: 幅 > -1 の場合にパディングする値。空の場合はスペースを埋め込みます。別の典型的な値は「0」です。文字列は 1 文字を超えることはできません。
戻り値:
パブリック属性
公共機能
ノード
::tensorflow::Node * node() const
operator::tensorflow::Input() const
演算子::tensorflow::出力
operator::tensorflow::Output() const
パブリック静的関数
埋める
Attrs Fill(
StringPiece x
)
精度
Attrs Precision(
int64 x
)
科学的
Attrs Scientific(
bool x
)
最短
Attrs Shortest(
bool x
)
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[],[],null,["# tensorflow::ops::AsString Class Reference\n\ntensorflow::ops::AsString\n=========================\n\n`#include \u003cstring_ops.h\u003e`\n\nConverts each entry in the given tensor to strings.\n\nSummary\n-------\n\nSupports many numeric types and boolean.\n\nFor Unicode, see the \\[\u003chttps://www.tensorflow.org/tutorials/representation/unicode\u003e\\](Working with Unicode text) tutorial.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/as-string/attrs#structtensorflow_1_1ops_1_1_as_string_1_1_attrs)):\n\n- precision: The post-decimal precision to use for floating point numbers. Only used if precision \\\u003e -1.\n- scientific: Use scientific notation for floating point numbers.\n- shortest: Use shortest representation (either scientific or standard) for floating point numbers.\n- width: [Pad](/versions/r2.1/api_docs/cc/class/tensorflow/ops/pad#classtensorflow_1_1ops_1_1_pad) pre-decimal numbers to this width. Applies to both floating point and integer numbers. Only used if width \\\u003e -1.\n- fill: The value to pad if width \\\u003e -1. If empty, pads with spaces. Another typical value is '0'. String cannot be longer than 1 character.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The output tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [AsString](#classtensorflow_1_1ops_1_1_as_string_1a93703cfbec4867fde47aa2259770786d)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input)` ||\n| [AsString](#classtensorflow_1_1ops_1_1_as_string_1a48e83706cffb25050240d9ae8e2d84e4)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input, const `[AsString::Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/as-string/attrs#structtensorflow_1_1ops_1_1_as_string_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|---------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_as_string_1a4f40ee7fcae884138385d66946669132) | [Operation](/versions/r2.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_as_string_1afd5f84ceab758a320b25af91eb1614ff) | `::`[tensorflow::Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|---------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_as_string_1abb163457f3457bfe14dd5192aeced5c5)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_as_string_1a25d4641309fe3d0f801105ad0b3027be)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_as_string_1a0b6fa38b640976c2d6651a9a96ae9fec)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|---------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|\n| [Fill](#classtensorflow_1_1ops_1_1_as_string_1ac3d8aab67abdc6322377e5d914aa3124)`(StringPiece x)` | [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/as-string/attrs#structtensorflow_1_1ops_1_1_as_string_1_1_attrs) |\n| [Precision](#classtensorflow_1_1ops_1_1_as_string_1aa3a1688f03e1afc119452b92d96054ff)`(int64 x)` | [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/as-string/attrs#structtensorflow_1_1ops_1_1_as_string_1_1_attrs) |\n| [Scientific](#classtensorflow_1_1ops_1_1_as_string_1a258997efffeb32c7733aaeef5f6b3614)`(bool x)` | [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/as-string/attrs#structtensorflow_1_1ops_1_1_as_string_1_1_attrs) |\n| [Shortest](#classtensorflow_1_1ops_1_1_as_string_1acfa9078d608f2939a48684fbf6607558)`(bool x)` | [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/as-string/attrs#structtensorflow_1_1ops_1_1_as_string_1_1_attrs) |\n| [Width](#classtensorflow_1_1ops_1_1_as_string_1a5c6d3289fae480ee2909b51f14351bf5)`(int64 x)` | [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/as-string/attrs#structtensorflow_1_1ops_1_1_as_string_1_1_attrs) |\n\n| ### Structs ||\n|------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::AsString::Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/as-string/attrs) | Optional attribute setters for [AsString](/versions/r2.1/api_docs/cc/class/tensorflow/ops/as-string#classtensorflow_1_1ops_1_1_as_string). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::Output output\n``` \n\nPublic functions\n----------------\n\n### AsString\n\n```gdscript\n AsString(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input\n)\n``` \n\n### AsString\n\n```gdscript\n AsString(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n const AsString::Attrs & attrs\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n``` \n\nPublic static functions\n-----------------------\n\n### Fill\n\n```text\nAttrs Fill(\n StringPiece x\n)\n``` \n\n### Precision\n\n```text\nAttrs Precision(\n int64 x\n)\n``` \n\n### Scientific\n\n```text\nAttrs Scientific(\n bool x\n)\n``` \n\n### Shortest\n\n```text\nAttrs Shortest(\n bool x\n)\n``` \n\n### Width\n\n```text\nAttrs Width(\n int64 x\n)\n```"]]