تدفق التوتر:: العمليات:: تحديث مبعثر

#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 بعد الانتهاء من التحديث. وهذا يجعل من السهل ربط العمليات التي تحتاج إلى استخدام قيمة إعادة التعيين.

إذا كان سيتم تحديث القيم في ref أكثر من مرة، نظرًا لوجود إدخالات مكررة في indices ، فإن الترتيب الذي تحدث به التحديثات لكل قيمة غير محدد.

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

راجع أيضًا tf.batch_scatter_update و tf.scatter_nd_update .

الحجج:

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

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

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

عائدات:

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

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

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

الصفات العامة

operation
output_ref

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

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

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

UseLocking (bool x)

الهياكل

Tensorflow:: ops:: ScatterUpdate:: Attrs

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

الصفات العامة

عملية

Operation operation

input_ref

::tensorflow::Output output_ref

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

تحديث مبعثر

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

تحديث مبعثر

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

العقدة

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

المشغل::tensorflow::الإخراج

 operator::tensorflow::Output() const 

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

UseLocking

Attrs UseLocking(
  bool x
)