จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
#include <string_ops.h>
จัดรูปแบบเทมเพลตสตริงโดยใช้รายการเทนเซอร์
สรุป
จัดรูปแบบเทมเพลตสตริงโดยใช้รายการเทนเซอร์ ซึ่งเป็นข้อมูลสรุปเทนเซอร์ที่พิมพ์ได้สวยงาม
ข้อโต้แย้ง:
- ขอบเขต: วัตถุ ขอบเขต
- อินพุต: รายการเทนเซอร์ที่จะจัดรูปแบบเป็นสตริงตัวยึดตำแหน่ง
แอ็ตทริบิวต์ทางเลือก (ดู Attrs
):
- template_: สตริง ซึ่งเป็นเทมเพลตสำหรับจัดรูปแบบสรุปเทนเซอร์
- ตัวยึดตำแหน่ง: สตริง ที่ตัวยึดตำแหน่งแต่ละตัวในเทมเพลตจะมีการแทรกข้อมูลสรุปเทนเซอร์ตามมา
- สรุป: เมื่อจัดรูปแบบสรุปเทนเซอร์ ให้พิมพ์รายการสรุปรายการแรกและรายการสรุปสุดท้ายของแต่ละมิติเทนเซอร์
ผลตอบแทน:
-
Output
: = สเกลาร์สตริงผลลัพธ์
คุณลักษณะสาธารณะ
งานสาธารณะ
ฟังก์ชันคงที่สาธารณะ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[],[],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.1/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.1/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.1/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.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::InputList](/versions/r2.1/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.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::InputList](/versions/r2.1/api_docs/cc/class/tensorflow/input-list#classtensorflow_1_1_input_list)` inputs, const `[StringFormat::Attrs](/versions/r2.1/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.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_string_format_1ad804e61daa8ee29a7589034620bc6957) | `::`[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_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.1/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.1/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.1/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.1/api_docs/cc/struct/tensorflow/ops/string-format/attrs) | Optional attribute setters for [StringFormat](/versions/r2.1/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```"]]