تدفق التوتر:: العمليات:: عكس التقليب
#include <array_ops.h>
يحسب التقليب العكسي للموتر.
ملخص
تحسب هذه العملية معكوس تبديل الفهرس. يستغرق الأمر موترًا صحيحًا أحادي الأبعاد 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]
الحجج:
العوائد:
الصفات العامة
عملية
Operation operation
ذ
::tensorflow::Output y
الوظائف العامة
عكس التقليب
InvertPermutation(
const ::tensorflow::Scope & scope,
::tensorflow::Input x
)
العقدة
::tensorflow::Node * node() const
operator::tensorflow::Input() const
المشغل::tensorflow::الإخراج
operator::tensorflow::Output() const
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],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.2/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.2/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.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)` x)` ||\n\n| ### Public attributes ||\n|------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_invert_permutation_1a10bdbd547af396286b226a61b4417c89) | [Operation](/versions/r2.2/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [y](#classtensorflow_1_1ops_1_1_invert_permutation_1a4c610e367ae065a0aa870a4d171fd0d6) | `::`[tensorflow::Output](/versions/r2.2/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```"]]