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

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

#include <state_ops.h>

يضيف تحديثات متفرقة إلى مرجع متغير.

ملخص

تحسب هذه العملية

# Scalar indices
ref[indices, ...] += updates[...]

# Vector indices (for each i)
ref[indices[i], ...] += updates[i, ...]

# High rank indices (for each i, ..., j)
ref[indices[i, ..., j], ...] += updates[i, ..., j, ...]

تنتج هذه العملية ref بعد إتمام التحديث. هذا يجعل من السهل سلسلة العمليات التي تحتاج إلى استخدام قيمة إعادة التعيين.

يتم التعامل مع الإدخالات المكررة بشكل صحيح: إذا كانت هناك indices متعددة تشير إلى نفس الموقع ، فإن مساهماتها تضيف.

يتطلب updates.shape = indices.shape + ref.shape[1:] أو updates.shape = [] .

الحجج:

  • النطاق: كائن النطاق
  • المرجع: يجب أن يكون من عقدة Variable .
  • المؤشرات: موتر من المؤشرات في البعد الأول من ref .
  • التحديثات: موتر من القيم المحدثة لإضافتها إلى ref .

السمات الاختيارية (انظر Attrs ):

  • use_locking: إذا كان هذا صحيحًا ، فستتم حماية الإضافة بقفل ؛ وبخلاف ذلك ، يكون السلوك غير محدد ، ولكنه قد يعرض خلافًا أقل.

عائدات:

  • Output : = نفس ref . يُعاد كتسهيل للعمليات التي تريد استخدام القيم المحدّثة بعد إتمام التحديث.

البنائين والمدمرين

ScatterAdd (const :: tensorflow::Scope & scope, :: tensorflow::Input ref, :: tensorflow::Input indices, :: tensorflow::Input updates)
ScatterAdd (const :: tensorflow::Scope & scope, :: tensorflow::Input ref, :: tensorflow::Input indices, :: tensorflow::Input updates, const ScatterAdd::Attrs & attrs)

السمات العامة

operation
output_ref

الوظائف العامة

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

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

UseLocking (bool x)

الهياكل

tensorflow :: العمليات :: ScatterAdd :: Attrs

محددات السمات الاختيارية لـ ScatterAdd .

السمات العامة

عملية

Operation operation

output_ref

::tensorflow::Output output_ref

الوظائف العامة

مبعثر

 ScatterAdd(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input ref,
  ::tensorflow::Input indices,
  ::tensorflow::Input updates
)

مبعثر

 ScatterAdd(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input ref,
  ::tensorflow::Input indices,
  ::tensorflow::Input updates,
  const ScatterAdd::Attrs & attrs
)

العقدة

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const 

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

UseLocking

Attrs UseLocking(
  bool x
)