संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
टेंसरफ़्लो:: ऑप्स:: उलटक्रमपरिवर्तन
#include <array_ops.h>
एक टेंसर के व्युत्क्रम क्रमपरिवर्तन की गणना करता है।
सारांश
यह ऑपरेशन सूचकांक क्रमपरिवर्तन के व्युत्क्रम की गणना करता है। यह एक 1-डी पूर्णांक टेंसर x
लेता है, जो शून्य-आधारित सरणी के सूचकांकों का प्रतिनिधित्व करता है, और प्रत्येक मान को उसकी सूचकांक स्थिति के साथ स्वैप करता है। दूसरे शब्दों में, एक आउटपुट टेंसर y
और एक इनपुट टेंसर x
के लिए, यह ऑपरेशन निम्नलिखित की गणना करता है:
y[x[i]] = i for i in [0, 1, ..., len(x) - 1]
मानों में 0 शामिल होना चाहिए। कोई डुप्लिकेट मान या नकारात्मक मान नहीं हो सकते।
उदाहरण के लिए:
# tensor `x` is [3, 4, 0, 2, 1]
invert_permutation(x) ==> [2, 4, 3, 0, 1]
तर्क:
- स्कोप: एक स्कोप ऑब्जेक्ट
- एक्स: 1-डी.
रिटर्न:
सार्वजनिक गुण
सार्वजनिक समारोह
नोड
::tensorflow::Node * node() const
operator::tensorflow::Input() const
ऑपरेटर::टेन्सरफ़्लो::आउटपुट
operator::tensorflow::Output() const
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[],[],null,["# tensorflow::ops::InvertPermutation Class Reference\n\ntensorflow::ops::InvertPermutation\n==================================\n\n`#include \u003carray_ops.h\u003e`\n\nComputes the inverse permutation of a tensor.\n\nSummary\n-------\n\nThis operation computes the inverse of an index permutation. It takes a 1-D integer tensor `x`, which represents the indices of a zero-based array, and swaps each value with its index position. In other words, for an output tensor `y` and an input tensor `x`, this operation computes the following:\n\n\n`y[x[i]] = i for i in [0, 1, ..., len(x) - 1]`\n\nThe values must include 0. There can be no duplicate values or negative values.\n\nFor example:\n\n\n```mysql\n# tensor `x` is [3, 4, 0, 2, 1]\ninvert_permutation(x) ==\u003e [2, 4, 3, 0, 1]\n```\n\n\u003cbr /\u003e\n\nArguments:\n\n- scope: A [Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- x: 1-D.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): 1-D.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [InvertPermutation](#classtensorflow_1_1ops_1_1_invert_permutation_1a47c39ba350709259ed5fbaec9e0e3ef8)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` x)` ||\n\n| ### Public attributes ||\n|------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_invert_permutation_1a10bdbd547af396286b226a61b4417c89) | [Operation](/versions/r2.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [y](#classtensorflow_1_1ops_1_1_invert_permutation_1a4c610e367ae065a0aa870a4d171fd0d6) | `::`[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_invert_permutation_1af81a3c965d5a4111a80a32b928075993)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_invert_permutation_1a37078d47cc8bf77238aeb89a0768413b)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_invert_permutation_1a7b457c171ec14a65cc07f10866ddcd76)`() const ` | ` ` ` ` |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### y\n\n```text\n::tensorflow::Output y\n``` \n\nPublic functions\n----------------\n\n### InvertPermutation\n\n```gdscript\n InvertPermutation(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input x\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```"]]