تينسورفلو :: العمليات :: جمع
#include <array_ops.h>
اجمع الشرائح من محور axis
params
وفقًا indices
.
ملخص
يجب أن تكون indices
عددًا صحيحًا موترًا لأي بُعد (عادةً 0-D أو 1-D). ينتج موتر إخراج باستخدام params.shape[:axis] + indices.shape + params.shape[axis + 1:]
حيث:
# Scalar indices (output is rank(params) - 1). output[a_0, ..., a_n, b_0, ..., b_n] = params[a_0, ..., a_n, indices, b_0, ..., b_n]
# Vector indices (output is rank(params)). output[a_0, ..., a_n, i, b_0, ..., b_n] = params[a_0, ..., a_n, indices[i], b_0, ..., b_n]
# Higher rank indices (output is rank(params) + rank(indices) - 1). output[a_0, ..., a_n, i, ..., j, b_0, ... b_n] = params[a_0, ..., a_n, indices[i, ..., j], b_0, ..., b_n]
لاحظ أنه في وحدة المعالجة المركزية ، إذا تم العثور على فهرس خارج النطاق ، يتم إرجاع خطأ. في وحدة معالجة الرسومات ، إذا تم العثور على فهرس خارج النطاق ، يتم تخزين 0 في قيمة الإخراج المقابلة.
راجع أيضًا tf.batch_gather
و tf.gather_nd
.
الحجج:
- النطاق: كائن النطاق
- المعلمات: الموتر الذي يتم من خلاله جمع القيم. يجب أن يكون
axis + 1
. - المؤشرات: مؤشر موتر. يجب أن يكون في النطاق
[0, params.shape[axis])
. - المحور: المحور في
params
المراد تجميعindices
منه. افتراضات إلى البعد الأول. يدعم الفهارس السلبية.
عائدات:
-
Output
: القيم منparams
التي تم جمعها منindices
، معparams.shape[:axis] + indices.shape + params.shape[axis + 1:]
.
البنائين والمدمرين | |
---|---|
GatherV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices, :: tensorflow::Input axis) | |
GatherV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices, :: tensorflow::Input axis, const GatherV2::Attrs & attrs) |
السمات العامة | |
---|---|
operation | |
output |
الوظائف العامة | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
وظائف ثابتة عامة | |
---|---|
BatchDims (int64 x) |
الهياكل | |
---|---|
tensorflow :: العمليات :: GatherV2 :: Attrs | محددات السمات الاختيارية لـ GatherV2 . |
السمات العامة
عملية
Operation operation
انتاج
::tensorflow::Output output
الوظائف العامة
جمع
GatherV2( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices, ::tensorflow::Input axis )
جمع
GatherV2( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices, ::tensorflow::Input axis, const GatherV2::Attrs & attrs )
العقدة
::tensorflow::Node * node() const
المشغل :: tensorflow :: الإدخال
operator::tensorflow::Input() const
المشغل :: Tensorflow :: Output
operator::tensorflow::Output() const
وظائف ثابتة عامة
دفعات
Attrs BatchDims( int64 x )
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2022-11-01 (حسب التوقيت العالمي المتفَّق عليه)