tensorflow:: ops:: Gather
#include <array_ops.h> اجمع الشرائح من params وفقًا indices .
ملخص
يجب أن تكون indices عبارة عن موتر عددي صحيح بأي بُعد (عادةً ما يكون صفري الأبعاد أو أحادي الأبعاد). ينتج موترًا ناتجًا بالشكل indices.shape + params.shape[1:] حيث:
# Scalar indices
output[:, ..., :] = params[indices, :, ... :]# Vector indices output[i, :, ..., :] = params[indices[i], :, ... :]
# Higher rank indices
output[i, ..., j, :, ... :] = params[indices[i, ..., j], :, ..., :] إذا كانت indices عبارة عن تبديل وكان len(indices) == params.shape[0] فإن هذه العملية ستقوم بتبديل params وفقًا لذلك.
validate_indices : مُهملة. إذا تم إسناد هذه العملية إلى وحدة المعالجة المركزية، فسيتم دائمًا التحقق من صحة قيم indices للتأكد من أنها ضمن النطاق. أما إذا تم إسنادها إلى وحدة معالجة الرسومات، فإن الفهارس الخارجة عن النطاق تؤدي إلى سلوك آمن ولكنه غير محدد، والذي قد يتضمن ظهور خطأ.

الحجج:
- النطاق: كائن النطاق
المرتجعات:
-
Output: موتر الناتج.
البناة والمدمرون | |
|---|---|
Gather (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices) | |
Gather (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices, const Gather::Attrs & attrs) |
السمات العامة | |
|---|---|
operation | |
output | |
الوظائف العامة | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
الدوال الثابتة العامة | |
|---|---|
ValidateIndices (bool x) | |
الهياكل | |
|---|---|
| tensorflow:: ops:: Gather:: Attrs | مُعدِّلات السمات الاختيارية لـ Gather . |
السمات العامة
عملية
Operation operation
المخرجات
::tensorflow::Output output
الوظائف العامة
يجتمع
Gather( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices )
يجتمع
Gather( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices, const Gather::Attrs & attrs )
العقدة
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
الدوال الثابتة العامة
التحقق من صحة المؤشرات
Attrs ValidateIndices( bool x )
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2026-11-05 (حسب التوقيت العالمي المتفَّق عليه)