tensorflow:: ops:: ScatterUpdate

#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 ):

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

المرتجعات:

  • 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

output_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 

operator::tensorflow::Input

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const 

الدوال الثابتة العامة

قفل الاستخدام

Attrs UseLocking(
  bool x
)