تدفق التوتر:: العمليات:: إضافة مبعثر
#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: إذا كان True، فسيتم حماية الإضافة بقفل؛ وإلا فإن السلوك غير محدد، ولكنه قد يحمل قدرًا أقل من الخلاف.
العوائد:
-
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:: ops:: ScatterAdd:: Attrs | محددات السمات الاختيارية لـ ScatterAdd . |
الصفات العامة
عملية
Operation operation
input_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::الإخراج
operator::tensorflow::Output() const
وظائف ثابتة العامة
UseLocking
Attrs UseLocking(
bool x
)