tensorflow:: אופס:: ScatterMul
#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 = []
.
טיעונים:
- scope: אובייקט Scope
- ref: צריך להיות מצומת
Variable
. - מדדים: טנסור של מדדים לממד הראשון של
ref
. - עדכונים: טנסור של ערכים מעודכנים להכפלה ל-
ref
.
מאפיינים אופציונליים (ראה Attrs
):
- use_locking: אם נכון, הפעולה תהיה מוגנת על ידי מנעול; אחרת ההתנהגות אינה מוגדרת, אך עלולה להפגין פחות מחלוקת.
החזרות:
-
Output
: = זהה ל-ref
. הוחזר כנוחות עבור פעולות שרוצות להשתמש בערכים המעודכנים לאחר ביצוע העדכון.
בנאים והורסים | |
---|---|
ScatterMul (const :: tensorflow::Scope & scope, :: tensorflow::Input ref, :: tensorflow::Input indices, :: tensorflow::Input updates) | |
ScatterMul (const :: tensorflow::Scope & scope, :: tensorflow::Input ref, :: tensorflow::Input indices, :: tensorflow::Input updates, const ScatterMul::Attrs & attrs) |
תכונות ציבוריות | |
---|---|
operation | |
output_ref |
תפקידים ציבוריים | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
פונקציות סטטיות ציבוריות | |
---|---|
UseLocking (bool x) |
מבנים | |
---|---|
tensorflow:: ops:: ScatterMul:: Attrs | קובעי תכונות אופציונליים עבור ScatterMul . |
תכונות ציבוריות
מִבצָע
Operation operation
פלט_ref
::tensorflow::Output output_ref
תפקידים ציבוריים
ScatterMul
ScatterMul( const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates )
ScatterMul
ScatterMul( const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates, const ScatterMul::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 ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[],[],null,["# tensorflow::ops::ScatterMul Class Reference\n\ntensorflow::ops::ScatterMul\n===========================\n\n`#include \u003cstate_ops.h\u003e`\n\nMultiplies sparse updates into a variable reference.\n\nSummary\n-------\n\nThis operation computes\n\n\n```scdoc\n # Scalar indices\n ref[indices, ...] *= updates[...]\n```\n\n\u003cbr /\u003e\n\n\n```transact-sql\n # Vector indices (for each i)\n ref[indices[i], ...] *= updates[i, ...]\n```\n\n\u003cbr /\u003e\n\n\n```scdoc\n # High rank indices (for each i, ..., j)\n ref[indices[i, ..., j], ...] *= updates[i, ..., j, ...]\n```\n\n\u003cbr /\u003e\n\nThis operation outputs `ref` after the update is done. This makes it easier to chain operations that need to use the reset value.\n\nDuplicate entries are handled correctly: if multiple `indices` reference the same location, their contributions multiply.\n\nRequires `updates.shape = indices.shape + ref.shape[1:]` or `updates.shape = []`.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- ref: Should be from a [Variable](/versions/r2.3/api_docs/cc/class/tensorflow/ops/variable#classtensorflow_1_1ops_1_1_variable) node.\n- indices: A tensor of indices into the first dimension of `ref`.\n- updates: A tensor of updated values to multiply to `ref`.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/scatter-mul/attrs#structtensorflow_1_1ops_1_1_scatter_mul_1_1_attrs)):\n\n- use_locking: If True, the operation will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): = Same as `ref`. Returned as a convenience for operations that want to use the updated values after the update is done.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [ScatterMul](#classtensorflow_1_1ops_1_1_scatter_mul_1a7db6b5ac554e784855d78d429e7574e3)`(const ::`[tensorflow::Scope](/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` ref, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` indices, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` updates)` ||\n| [ScatterMul](#classtensorflow_1_1ops_1_1_scatter_mul_1a59f4787f45824ffa7053c4184caea38f)`(const ::`[tensorflow::Scope](/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` ref, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` indices, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` updates, const `[ScatterMul::Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/scatter-mul/attrs#structtensorflow_1_1ops_1_1_scatter_mul_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_scatter_mul_1a3e2e0e89df1f658634f7268ac3785dd8) | [Operation](/versions/r2.3/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output_ref](#classtensorflow_1_1ops_1_1_scatter_mul_1a6c4d285e1c8631ca2fad4529c134bd60) | `::`[tensorflow::Output](/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|-----------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_scatter_mul_1a643d99a44650276080fea233a3649261)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_scatter_mul_1a1c452250deb719e0fea5fb0714fa7231)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_scatter_mul_1ab7c16cd28461b1d78e7b1d1efd4811da)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|----------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|\n| [UseLocking](#classtensorflow_1_1ops_1_1_scatter_mul_1aaacc375e6d81db93be7d7823990b3b9b)`(bool x)` | [Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/scatter-mul/attrs#structtensorflow_1_1ops_1_1_scatter_mul_1_1_attrs) |\n\n| ### Structs ||\n|----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::ScatterMul::Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/scatter-mul/attrs) | Optional attribute setters for [ScatterMul](/versions/r2.3/api_docs/cc/class/tensorflow/ops/scatter-mul#classtensorflow_1_1ops_1_1_scatter_mul). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output_ref\n\n```scdoc\n::tensorflow::Output output_ref\n``` \n\nPublic functions\n----------------\n\n### ScatterMul\n\n```gdscript\n ScatterMul(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input ref,\n ::tensorflow::Input indices,\n ::tensorflow::Input updates\n)\n``` \n\n### ScatterMul\n\n```gdscript\n ScatterMul(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input ref,\n ::tensorflow::Input indices,\n ::tensorflow::Input updates,\n const ScatterMul::Attrs & attrs\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n``` \n\nPublic static functions\n-----------------------\n\n### UseLocking\n\n```text\nAttrs UseLocking(\n bool x\n)\n```"]]