تدفق التوتر:: العمليات:: طول السلسلة:: أترز
#include <string_ops.h>
محددات السمات الاختيارية لـ StringLength .
ملخص
الصفات العامة | |
---|---|
unit_ = "BYTE" | StringPiece |
الوظائف العامة | |
---|---|
Unit (StringPiece x) | TF_MUST_USE_RESULT Attrs الوحدة التي يتم حسابها لحساب طول السلسلة. |
الصفات العامة
وحدة_
StringPiece tensorflow::ops::StringLength::Attrs::unit_ = "BYTE"
الوظائف العامة
وحدة
TF_MUST_USE_RESULT Attrs tensorflow::ops::StringLength::Attrs::Unit( StringPiece x )
الوحدة التي يتم حسابها لحساب طول السلسلة.
واحد من: "BYTE"
(لعدد البايتات في كل سلسلة) أو "UTF8_CHAR"
(لعدد نقاط كود Unicode المشفرة UTF-8 في كل سلسلة). تكون النتائج غير محددة إذا كانت unit=UTF8_CHAR
وكانت سلاسل input
لا تحتوي على UTF-8 صالح من الناحية الهيكلية.
الإعدادات الافتراضية إلى "BYTE"
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-28 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-28 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# tensorflow::ops::StringLength::Attrs Struct Reference\n\ntensorflow::ops::StringLength::Attrs\n====================================\n\n`#include \u003cstring_ops.h\u003e`\n\nOptional attribute setters for [StringLength](/versions/r1.15/api_docs/cc/class/tensorflow/ops/string-length#classtensorflow_1_1ops_1_1_string_length).\n\nSummary\n-------\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------------------------------|---------------|\n| [unit_](#structtensorflow_1_1ops_1_1_string_length_1_1_attrs_1a20ddf74f682ff45eee049cef9c6ebab1)` = \"BYTE\"` | `StringPiece` |\n\n| ### Public functions ||\n|------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Unit](#structtensorflow_1_1ops_1_1_string_length_1_1_attrs_1ac8d16dcfea721edfcf1fe9ecd4db17d9)`(StringPiece x)` | `TF_MUST_USE_RESULT `[Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/string-length/attrs#structtensorflow_1_1ops_1_1_string_length_1_1_attrs) The unit that is counted to compute string length. |\n\nPublic attributes\n-----------------\n\n### unit_\n\n```scdoc\nStringPiece tensorflow::ops::StringLength::Attrs::unit_ = \"BYTE\"\n``` \n\nPublic functions\n----------------\n\n### Unit\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::StringLength::Attrs::Unit(\n StringPiece x\n)\n``` \nThe unit that is counted to compute string length.\n\nOne of: `\"BYTE\"` (for the number of bytes in each string) or `\"UTF8_CHAR\"` (for the number of UTF-8 encoded Unicode code points in each string). Results are undefined if `unit=UTF8_CHAR` and the `input` strings do not contain structurally valid UTF-8.\n\nDefaults to \"BYTE\""]]