تدفق التوتر:: العمليات:: يجتمع

#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 : تم إهماله. إذا تم تعيين هذه العملية إلى وحدة المعالجة المركزية، فسيتم دائمًا التحقق من صحة القيم الموجودة في 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:: اجمع:: 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::الإخراج

 operator::tensorflow::Output() const 

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

ValidateIndices

Attrs ValidateIndices(
  bool x
)