संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
टेंसरफ़्लो:: ऑप्स:: पार्सेउदाहरण
#include <parsing_ops.h>
मस्तिष्क के एक वेक्टर को परिवर्तित करता है। उदाहरण प्रोटोज़ (स्ट्रिंग्स के रूप में) को टाइप किए गए टेंसर में।
सारांश
तर्क:
- स्कोप: एक स्कोप ऑब्जेक्ट
- क्रमबद्ध: एक वेक्टर जिसमें बाइनरी क्रमबद्ध उदाहरण प्रोटोस का एक बैच होता है।
- नाम: एक वेक्टर जिसमें क्रमबद्ध प्रोटो के नाम होते हैं। उदाहरण के लिए, संबंधित क्रमबद्ध प्रोटोज़ के लिए तालिका कुंजी (वर्णनात्मक) नाम शामिल हो सकते हैं। ये पूरी तरह से डिबगिंग उद्देश्यों के लिए उपयोगी हैं, और यहां मूल्यों की उपस्थिति का आउटपुट पर कोई प्रभाव नहीं पड़ता है। यदि कोई नाम उपलब्ध नहीं है तो यह एक खाली वेक्टर भी हो सकता है। यदि गैर-रिक्त है, तो इस वेक्टर की लंबाई "क्रमबद्ध" के समान होनी चाहिए।
- sparse_keys: Nsparse स्ट्रिंग टेंसर (स्केलर) की एक सूची। उदाहरणों की विशेषताओं में अपेक्षित कुंजियाँ विरल मानों से संबद्ध हैं।
- सघन_कीज़: एनडेंस स्ट्रिंग टेंसर (स्केलर) की एक सूची। उदाहरणों की विशेषताओं में अपेक्षित कुंजियाँ सघन मानों से संबद्ध हैं।
- सघन_डिफ़ॉल्ट्स: एनडेंस टेंसर्स की एक सूची (कुछ खाली हो सकते हैं)। जब उदाहरण के फीचर_मैप में Dens_key[j] का अभाव होता है, तोdens_defaults[j] डिफ़ॉल्ट मान प्रदान करता है। यदिडेंस_डिफॉल्ट्स[जे] के लिए एक खाली टेंसर प्रदान किया जाता है, तो फ़ीचर डेंस_कीज़[जे] की आवश्यकता होती है। इनपुट प्रकार का अनुमान Dens_defaults[j] से लगाया जाता है, भले ही वह खाली हो। यदि सघन_डिफॉल्ट्स[जे] खाली नहीं है, और सघन_आकार[जे] पूरी तरह से परिभाषित है, तो सघन_डिफॉल्ट्स[जे] का आकार सघन_आकार[जे] से मेल खाना चाहिए। यदिdens_shapes[j] में एक अपरिभाषित प्रमुख आयाम (चर स्ट्राइड्स डेंस फीचर) है, तोdens_defaults[j] में एक ही तत्व होना चाहिए: पैडिंग तत्व।
- sparse_types: Nsparse प्रकारों की एक सूची; प्रत्येक फ़ीचर में डेटा के प्रकार sparse_keys में दिए गए हैं। वर्तमान में ParseExample DT_FLOAT (FloatList), DT_INT64 (Int64List), और DT_STRING (बाइट्सलिस्ट) का समर्थन करता है।
- सघन_आकृतियाँ: घनी आकृतियों की एक सूची; प्रत्येक फ़ीचर में डेटा के आकार सघन_कुंजी में दिए गए हैं। फ़ीचर में Dens_key[j] से संबंधित तत्वों की संख्या हमेशा Dens_shapes[j].NumEntries() के बराबर होनी चाहिए। यदि सघन_आकार[j] == (D0, D1, ..., DN) तो आउटपुट का आकार Tensor Dens_values[j] होगा (|serialized|, D0, D1, ..., DN): सघन आउटपुट हैं बस इनपुट को बैच द्वारा पंक्तिबद्ध किया गया है। यहdens_shapes[j] = (-1, D1, ..., DN) के लिए काम करता है। इस स्थिति में आउटपुट Tensordens_values [j] का आकार (|serialized|, M, D1, .., DN) होगा, जहां M लंबाई D1 * .... * DN के तत्वों के ब्लॉक की अधिकतम संख्या है , इनपुट में सभी मिनीबैच प्रविष्टियों में। लंबाई D1 * ... * DN के तत्वों के M से कम ब्लॉक वाली किसी भी मिनीबैच प्रविष्टि को दूसरे आयाम के साथ संबंधित default_value स्केलर तत्व के साथ जोड़ा जाएगा।
रिटर्न:
-
OutputList
sparse_indices -
OutputList
sparse_values -
OutputList
sparse_shapes -
OutputList
सघन_मूल्य
सार्वजनिक गुण
सार्वजनिक समारोह
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया."],[],[],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```"]]