Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
przepływ tensorowy:: ops:: AsString
#include <string_ops.h>
Konwertuje każdy wpis w danym tensorze na ciągi.
Streszczenie
Obsługuje wiele typów liczbowych i logicznych.
W przypadku Unicode zobacz samouczek [ https://www.tensorflow.org/tutorials/representation/unicode ](Praca z tekstem Unicode).
Argumenty:
Opcjonalne atrybuty (patrz Attrs
):
- precyzja: precyzja po przecinku stosowana w przypadku liczb zmiennoprzecinkowych. Używane tylko wtedy, gdy precyzja > -1.
- naukowy: Użyj notacji naukowej dla liczb zmiennoprzecinkowych.
- najkrótszy: użyj najkrótszej reprezentacji (naukowej lub standardowej) dla liczb zmiennoprzecinkowych.
- szerokość: dopasuj liczby przeddziesiętne do tej szerokości. Dotyczy zarówno liczb zmiennoprzecinkowych, jak i całkowitych. Używane tylko wtedy, gdy szerokość > -1.
- fill: Wartość do wypełnienia, jeśli szerokość > -1. Jeśli puste, podkładki ze spacjami. Inną typową wartością jest „0”. Ciąg nie może być dłuższy niż 1 znak.
Zwroty:
Atrybuty publiczne
Funkcje publiczne
węzeł
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Wyjście
operator::tensorflow::Output() const
Publiczne funkcje statyczne
Wypełnić
Attrs Fill(
StringPiece x
)
Precyzja
Attrs Precision(
int64 x
)
Naukowy
Attrs Scientific(
bool x
)
Najkrótszy
Attrs Shortest(
bool x
)
Szerokość
Attrs Width(
int64 x
)
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 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/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r1.15/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/r1.15/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/r1.15/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/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/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/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input, const `[AsString::Attrs](/versions/r1.15/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/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_as_string_1afd5f84ceab758a320b25af91eb1614ff) | `::`[tensorflow::Output](/versions/r1.15/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/r1.15/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/r1.15/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/r1.15/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/r1.15/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/r1.15/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/r1.15/api_docs/cc/struct/tensorflow/ops/as-string/attrs) | Optional attribute setters for [AsString](/versions/r1.15/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```"]]