تدفق التوتر:: العمليات:: تنسيق السلسلة
#include <string_ops.h>
تنسيق قالب سلسلة باستخدام قائمة الموترات.
ملخص
يقوم بتنسيق قالب سلسلة باستخدام قائمة من الموترات وملخصات الموترة ذات الطباعة الجميلة.
الحجج:
- النطاق: كائن النطاق
- المدخلات: قائمة الموترات المطلوب تنسيقها في سلسلة العنصر النائب.
السمات الاختيارية (انظر Attrs
):
- template_: سلسلة، القالب الذي سيتم تنسيق ملخصات الموتر فيه.
- العنصر النائب: سلسلة، في كل عنصر نائب في القالب سيتم إدراج ملخص موتر لاحق.
- تلخيص: عند تنسيق ملخصات الموتر، قم بطباعة إدخالات التلخيص الأولى والأخيرة لكل بُعد موتر.
العوائد:
-
Output
: = السلسلة العددية الناتجة.
البنائين والمدمرين | |
---|---|
StringFormat (const :: tensorflow::Scope & scope, :: tensorflow::InputList inputs) | |
StringFormat (const :: tensorflow::Scope & scope, :: tensorflow::InputList inputs, const StringFormat::Attrs & attrs) |
الصفات العامة | |
---|---|
operation | |
output |
الوظائف العامة | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
وظائف ثابتة العامة | |
---|---|
Placeholder (StringPiece x) | |
Summarize (int64 x) | |
Template (StringPiece x) |
الهياكل | |
---|---|
Tensorflow:: ops:: StringFormat:: Attrs | محددات السمات الاختيارية لـ StringFormat . |
الصفات العامة
عملية
Operation operation
الإخراج
::tensorflow::Output output
الوظائف العامة
تنسيق السلسلة
StringFormat( const ::tensorflow::Scope & scope, ::tensorflow::InputList inputs )
تنسيق السلسلة
StringFormat( const ::tensorflow::Scope & scope, ::tensorflow::InputList inputs, const StringFormat::Attrs & attrs )
العقدة
::tensorflow::Node * node() const
المشغل::tensorflow::الإدخال
operator::tensorflow::Input() const
المشغل::tensorflow::الإخراج
operator::tensorflow::Output() const
وظائف ثابتة العامة
العنصر النائب
Attrs Placeholder( StringPiece x )
تلخيص
Attrs Summarize( int64 x )
نموذج
Attrs Template( StringPiece x )
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# tensorflow::ops::StringFormat Class Reference\n\ntensorflow::ops::StringFormat\n=============================\n\n`#include \u003cstring_ops.h\u003e`\n\nFormats a string template using a list of tensors.\n\nSummary\n-------\n\nFormats a string template using a list of tensors, pretty-printing tensor summaries.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- inputs: The list of tensors to format into the placeholder string.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/string-format/attrs#structtensorflow_1_1ops_1_1_string_format_1_1_attrs)):\n\n- template_: A string, the template to format tensor summaries into.\n- placeholder: A string, at each placeholder in the template a subsequent tensor summary will be inserted.\n- summarize: When formatting the tensor summaries print the first and last summarize entries of each tensor dimension.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): = The resulting string scalar.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [StringFormat](#classtensorflow_1_1ops_1_1_string_format_1a2a49e6e78ef8bc53f1c131f57472c80f)`(const ::`[tensorflow::Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::InputList](/versions/r2.2/api_docs/cc/class/tensorflow/input-list#classtensorflow_1_1_input_list)` inputs)` ||\n| [StringFormat](#classtensorflow_1_1ops_1_1_string_format_1aa206a8f6062c185cd4054ea9c3eae135)`(const ::`[tensorflow::Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::InputList](/versions/r2.2/api_docs/cc/class/tensorflow/input-list#classtensorflow_1_1_input_list)` inputs, const `[StringFormat::Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/string-format/attrs#structtensorflow_1_1ops_1_1_string_format_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_string_format_1a79b84b00b14555109e9d022ed1d18247) | [Operation](/versions/r2.2/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_string_format_1ad804e61daa8ee29a7589034620bc6957) | `::`[tensorflow::Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|-------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_string_format_1a17f33c98eb82880a699b4fd280414866)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_string_format_1a18c365d68dd132b199860fd218352055)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_string_format_1a09f95b504d354326ed3bf116fefce058)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|--------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|\n| [Placeholder](#classtensorflow_1_1ops_1_1_string_format_1a5bbe893329638ba81c31a259ff88b059)`(StringPiece x)` | [Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/string-format/attrs#structtensorflow_1_1ops_1_1_string_format_1_1_attrs) |\n| [Summarize](#classtensorflow_1_1ops_1_1_string_format_1af1d26efd4527e1af585402a951364b86)`(int64 x)` | [Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/string-format/attrs#structtensorflow_1_1ops_1_1_string_format_1_1_attrs) |\n| [Template](#classtensorflow_1_1ops_1_1_string_format_1ac90801110cd85e5c9cdee2b025a7284b)`(StringPiece x)` | [Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/string-format/attrs#structtensorflow_1_1ops_1_1_string_format_1_1_attrs) |\n\n| ### Structs ||\n|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::StringFormat::Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/string-format/attrs) | Optional attribute setters for [StringFormat](/versions/r2.2/api_docs/cc/class/tensorflow/ops/string-format#classtensorflow_1_1ops_1_1_string_format). |\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### StringFormat\n\n```gdscript\n StringFormat(\n const ::tensorflow::Scope & scope,\n ::tensorflow::InputList inputs\n)\n``` \n\n### StringFormat\n\n```gdscript\n StringFormat(\n const ::tensorflow::Scope & scope,\n ::tensorflow::InputList inputs,\n const StringFormat::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### Placeholder\n\n```text\nAttrs Placeholder(\n StringPiece x\n)\n``` \n\n### Summarize\n\n```text\nAttrs Summarize(\n int64 x\n)\n``` \n\n### Template\n\n```text\nAttrs Template(\n StringPiece x\n)\n```"]]