نشكرك على متابعة Google I / O. عرض جميع الجلسات عند الطلب مشاهدة عند الطلب

تينسورفلو :: العمليات :: يجتمع

#include <array_ops.h>

اجمع الشرائح من params وفقًا indices .

ملخص

يجب أن تكون indices عددًا صحيحًا موترًا لأي بُعد (عادةً 0-D أو 1-D). ينتج موتر إخراج بمؤشرات الشكل. شكل 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 : مهملة. إذا تم تعيين هذه العملية إلى وحدة المعالجة المركزية (CPU) ، فسيتم دائمًا التحقق من صحة القيم الموجودة في indices لتكون ضمن النطاق. إذا تم تعيينها إلى GPU ، فإن المؤشرات غير المقيدة تؤدي إلى سلوك آمن ولكن غير محدد ، والذي قد يتضمن رفع خطأ.

الحجج:

عائدات:

  • 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 :: العمليات :: جمع :: 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 

المشغل :: tensorflow :: الإدخال

 operator::tensorflow::Input() const 

المشغل :: Tensorflow :: Output

 operator::tensorflow::Output() const 

وظائف ثابتة عامة

التحقق من صحة المؤشرات

Attrs ValidateIndices(
  bool x
)