tensorflow:: ops:: Scatterעדכון
#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
הפלט_הפניה
::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
פונקציות סטטיות ציבוריות
שימוש בנעילה
Attrs UseLocking( bool x )
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2026-11-05 (שעון UTC).