تينسورفلو :: العمليات :: مبعثر
#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
بعد إتمام التحديث. هذا يجعل من السهل سلسلة العمليات التي تحتاج إلى استخدام قيمة إعادة التعيين.
إذا كانت القيم في 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: إذا كان هذا صحيحًا ، فسيتم حماية المهمة بقفل ؛ وبخلاف ذلك ، يكون السلوك غير محدد ، ولكنه قد يعرض خلافًا أقل.
عائدات:
-
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 :: العمليات :: 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
المشغل :: tensorflow :: الإدخال
operator::tensorflow::Input() const
المشغل :: Tensorflow :: Output
operator::tensorflow::Output() const
وظائف ثابتة عامة
UseLocking
Attrs UseLocking( bool x )
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-04-20 UTC.