جریان تنسور:: عملیات:: ParseExample
#include <parsing_ops.h>
یک بردار مغز را تبدیل می کند. نمونه پروتوها (به عنوان رشته ها) به تانسورهای تایپ شده.
خلاصه
استدلال ها:
- scope: یک شی Scope
- serialized: بردار حاوی دستهای از پروتوهای نمونه سریالسازی شده باینری.
- names: بردار حاوی نام پروتوهای سریال شده. به عنوان مثال، ممکن است شامل نامهای کلید جدول (توصیفی) برای پروتوهای سریالی مربوطه باشد. اینها صرفاً برای اهداف اشکال زدایی مفید هستند و وجود مقادیر در اینجا تأثیری بر خروجی ندارد. اگر نامی در دسترس نباشد، ممکن است یک بردار خالی باشد. اگر خالی نباشد، این بردار باید به اندازه «سریال» باشد.
- sparse_keys: فهرستی از تانسورهای رشته Nsparse (اسکالر). کلیدهای مورد انتظار در ویژگیهای Examples مرتبط با مقادیر پراکنده هستند.
- dense_keys: فهرستی از تانسورهای رشته Ndense (اسکالرها). کلیدهای مورد انتظار در ویژگیهای Examples مرتبط با مقادیر متراکم هستند.
- dense_defaults: فهرستی از تانسورهای Ndense (ممکن است برخی خالی باشند). dense_defaults[j] زمانی مقادیر پیشفرض را ارائه میکند که feature_map مثال فاقد کلید[j] متراکم باشد. اگر یک تانسور خالی برای dense_defaults[j] ارائه شده باشد، سپس Feature dense_keys[j] مورد نیاز است. نوع ورودی از dense_defaults[j] استنباط می شود، حتی زمانی که خالی است. اگر dense_defaults[j] خالی نباشد، و dense_shapes[j] کاملاً تعریف شده باشد، شکل dense_defaults[j] باید با شکل dense_shapes[j] مطابقت داشته باشد. اگر dense_shapes[j] یک بعد اصلی تعریفنشده دارد (ویژگی متراکم گامهای متغیر)، dense_defaults[j] باید یک عنصر واحد داشته باشد: عنصر padding.
- sparse_types: فهرستی از انواع Nsparse. انواع داده های داده در هر ویژگی که در کلیدهای پراکنده ارائه شده است. در حال حاضر ParseExample از DT_FLOAT (FloatList)، DT_INT64 (Int64List) و DT_STRING (BytesList) پشتیبانی می کند.
- dense_shapes: فهرستی از اشکال Ndense. شکل داده ها در هر ویژگی به صورت dense_keys داده شده است. تعداد عناصر موجود در Feature مربوط به dense_key[j] باید همیشه برابر با dense_shapes[j] باشد.NumEntries(). اگر شکلهای متراکم[j] == (D0، D1، ...، DN) شکل تانسورهای متراکم[j] خروجی به صورت (|مجموعه|، D0، D1، ...، DN) خواهد بود: خروجیهای متراکم عبارتند از فقط ورودی ها به صورت دسته ای ردیف شده اند. این برای شکل های متراکم [j] = (-1، D1، ...، DN) کار می کند. در این حالت شکل تانسور خروجی dense_values[j] خواهد بود (|سریال|، M، D1، ..، DN)، که در آن M حداکثر تعداد بلوک های عناصر با طول D1 * .... * DN است. ، در تمام ورودی های minibatch در ورودی. هر ورودی minibatch با کمتر از M بلوک از عناصر به طول D1 * ... * DN با عنصر اسکالر default_value مربوطه در امتداد بعد دوم پر می شود.
برمیگرداند:
-
OutputList
sparse_indexes -
OutputList
sparse_values -
OutputList
sparse_shapes -
OutputList
dense_values
سازندگان و ویرانگرها | |
---|---|
ParseExample (const :: tensorflow::Scope & scope, :: tensorflow::Input serialized, :: tensorflow::Input names, :: tensorflow::InputList sparse_keys, :: tensorflow::InputList dense_keys, :: tensorflow::InputList dense_defaults, const DataTypeSlice & sparse_types, const gtl::ArraySlice< PartialTensorShape > & dense_shapes) |
صفات عمومی | |
---|---|
dense_values | |
operation | |
sparse_indices | |
sparse_shapes | |
sparse_values |
صفات عمومی
مقادیر_ متراکم
::tensorflow::OutputList dense_values
عملیات
Operation operation
اندیس_های پراکنده
::tensorflow::OutputList sparse_indices
شکل های پراکنده
::tensorflow::OutputList sparse_shapes
مقادیر_کم
::tensorflow::OutputList sparse_values
توابع عمومی
ParseExample
ParseExample( const ::tensorflow::Scope & scope, ::tensorflow::Input serialized, ::tensorflow::Input names, ::tensorflow::InputList sparse_keys, ::tensorflow::InputList dense_keys, ::tensorflow::InputList dense_defaults, const DataTypeSlice & sparse_types, const gtl::ArraySlice< PartialTensorShape > & dense_shapes )
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-27 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-27 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# tensorflow::ops::ParseExample Class Reference\n\ntensorflow::ops::ParseExample\n=============================\n\n`#include \u003cparsing_ops.h\u003e`\n\nTransforms a vector of brain.Example protos (as strings) into typed tensors.\n\nSummary\n-------\n\nArguments:\n\n- scope: A [Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- serialized: A vector containing a batch of binary serialized Example protos.\n- names: A vector containing the names of the serialized protos. May contain, for example, table key (descriptive) names for the corresponding serialized protos. These are purely useful for debugging purposes, and the presence of values here has no effect on the output. May also be an empty vector if no names are available. If non-empty, this vector must be the same length as \"serialized\".\n- sparse_keys: A list of Nsparse string Tensors (scalars). The keys expected in the Examples' features associated with sparse values.\n- dense_keys: A list of Ndense string Tensors (scalars). The keys expected in the Examples' features associated with dense values.\n- dense_defaults: A list of Ndense Tensors (some may be empty). dense_defaults\\[j\\] provides default values when the example's feature_map lacks dense_key\\[j\\]. If an empty [Tensor](/versions/r2.2/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) is provided for dense_defaults\\[j\\], then the Feature dense_keys\\[j\\] is required. The input type is inferred from dense_defaults\\[j\\], even when it's empty. If dense_defaults\\[j\\] is not empty, and dense_shapes\\[j\\] is fully defined, then the shape of dense_defaults\\[j\\] must match that of dense_shapes\\[j\\]. If dense_shapes\\[j\\] has an undefined major dimension (variable strides dense feature), dense_defaults\\[j\\] must contain a single element: the padding element.\n- sparse_types: A list of Nsparse types; the data types of data in each Feature given in sparse_keys. Currently the [ParseExample](/versions/r2.2/api_docs/cc/class/tensorflow/ops/parse-example#classtensorflow_1_1ops_1_1_parse_example) supports DT_FLOAT (FloatList), DT_INT64 (Int64List), and DT_STRING (BytesList).\n- dense_shapes: A list of Ndense shapes; the shapes of data in each Feature given in dense_keys. The number of elements in the Feature corresponding to dense_key\\[j\\] must always equal dense_shapes\\[j\\].NumEntries(). If dense_shapes\\[j\\] == (D0, D1, ..., DN) then the shape of output [Tensor](/versions/r2.2/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) dense_values\\[j\\] will be (\\|serialized\\|, D0, D1, ..., DN): The dense outputs are just the inputs row-stacked by batch. This works for dense_shapes\\[j\\] = (-1, D1, ..., DN). In this case the shape of the output [Tensor](/versions/r2.2/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) dense_values\\[j\\] will be (\\|serialized\\|, M, D1, .., DN), where M is the maximum number of blocks of elements of length D1 \\* .... \\* DN, across all minibatch entries in the input. [Any](/versions/r2.2/api_docs/cc/class/tensorflow/ops/any#classtensorflow_1_1ops_1_1_any) minibatch entry with less than M blocks of elements of length D1 \\* ... \\* DN will be padded with the corresponding default_value scalar element along the second dimension.\n\n\u003cbr /\u003e\n\nReturns:\n\n- `OutputList` sparse_indices\n- `OutputList` sparse_values\n- `OutputList` sparse_shapes\n- `OutputList` dense_values\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [ParseExample](#classtensorflow_1_1ops_1_1_parse_example_1abe97c3d8689593c4b7fc474df7232628)`(const ::`[tensorflow::Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` serialized, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` names, ::`[tensorflow::InputList](/versions/r2.2/api_docs/cc/class/tensorflow/input-list#classtensorflow_1_1_input_list)` sparse_keys, ::`[tensorflow::InputList](/versions/r2.2/api_docs/cc/class/tensorflow/input-list#classtensorflow_1_1_input_list)` dense_keys, ::`[tensorflow::InputList](/versions/r2.2/api_docs/cc/class/tensorflow/input-list#classtensorflow_1_1_input_list)` dense_defaults, const DataTypeSlice & sparse_types, const gtl::ArraySlice\u003c PartialTensorShape \u003e & dense_shapes)` ||\n\n| ### Public attributes ||\n|------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------|\n| [dense_values](#classtensorflow_1_1ops_1_1_parse_example_1a0621ad91c166916f20c4d8d38da78674) | `::`[tensorflow::OutputList](/versions/r2.2/api_docs/cc/group/core#group__core_1gab449e6a3abd500c2f4ea93f9e89ba96c) |\n| [operation](#classtensorflow_1_1ops_1_1_parse_example_1a68504c285f005f993b30252db06fbee0) | [Operation](/versions/r2.2/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [sparse_indices](#classtensorflow_1_1ops_1_1_parse_example_1a9f9016a149620b00fad16bff88591905) | `::`[tensorflow::OutputList](/versions/r2.2/api_docs/cc/group/core#group__core_1gab449e6a3abd500c2f4ea93f9e89ba96c) |\n| [sparse_shapes](#classtensorflow_1_1ops_1_1_parse_example_1a39e169f2156ee03b9755c6e4b7bf9641) | `::`[tensorflow::OutputList](/versions/r2.2/api_docs/cc/group/core#group__core_1gab449e6a3abd500c2f4ea93f9e89ba96c) |\n| [sparse_values](#classtensorflow_1_1ops_1_1_parse_example_1a39241716b69f84112f769ddf426c1a02) | `::`[tensorflow::OutputList](/versions/r2.2/api_docs/cc/group/core#group__core_1gab449e6a3abd500c2f4ea93f9e89ba96c) |\n\nPublic attributes\n-----------------\n\n### dense_values\n\n```scdoc\n::tensorflow::OutputList dense_values\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\n### sparse_indices\n\n```scdoc\n::tensorflow::OutputList sparse_indices\n``` \n\n### sparse_shapes\n\n```scdoc\n::tensorflow::OutputList sparse_shapes\n``` \n\n### sparse_values\n\n```scdoc\n::tensorflow::OutputList sparse_values\n``` \n\nPublic functions\n----------------\n\n### ParseExample\n\n```gdscript\n ParseExample(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input serialized,\n ::tensorflow::Input names,\n ::tensorflow::InputList sparse_keys,\n ::tensorflow::InputList dense_keys,\n ::tensorflow::InputList dense_defaults,\n const DataTypeSlice & sparse_types,\n const gtl::ArraySlice\u003c PartialTensorShape \u003e & dense_shapes\n)\n```"]]