tensorflow:: ops:: GatherV2
#include <array_ops.h> אסוף פרוסות params ציר axis לפי indices .
תַקצִיר
indices חייבים להיות טנזור שלם מכל ממד (בדרך כלל 0-D או 1-D). מייצר טנזור פלט עם הצורה params.shape[:axis] + indices.shape + params.shape[axis + 1:] כאשר:
# Scalar indices (output is rank(params) - 1).
output[a_0, ..., a_n, b_0, ..., b_n] =
params[a_0, ..., a_n, indices, b_0, ..., b_n]# Vector indices (output is rank(params)). output[a_0, ..., a_n, i, b_0, ..., b_n] = params[a_0, ..., a_n, indices[i], b_0, ..., b_n]
# Higher rank indices (output is rank(params) + rank(indices) - 1).
output[a_0, ..., a_n, i, ..., j, b_0, ... b_n] =
params[a_0, ..., a_n, indices[i, ..., j], b_0, ..., b_n]
שים לב שבמעבד, אם נמצא אינדקס מחוץ לגבולות, מוחזרת שגיאה. בכרטיס המסך, אם נמצא אינדקס מחוץ לגבולות, המספר 0 נשמר בערך הפלט המתאים.
ראה גם tf.batch_gather ו- tf.gather_nd .
טיעונים:
- היקף: אובייקט היקף
- פרמטרים: הטנזור שממנו יש לאסוף ערכים. חייב להיות לפחות
axis + 1. - אינדקסים: טנזור אינדקס. חייב להיות בטווח
[0, params.shape[axis]). - ציר: הציר
paramsשממנו יש לאסוףindices. ברירת המחדל היא הממד הראשון. תומך באינדקסים שליליים.
החזרות:
-
Output: ערכיםparamsשנאספו מאינדקסים שניתנו על ידיindices, עם shapeparams.shape[:axis] + indices.shape + params.shape[axis + 1:].
בנאים והורסים | |
|---|---|
GatherV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices, :: tensorflow::Input axis) | |
GatherV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices, :: tensorflow::Input axis, const GatherV2::Attrs & attrs) |
מאפיינים ציבוריים | |
|---|---|
operation | |
output | |
תפקידים ציבוריים | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
פונקציות סטטיות ציבוריות | |
|---|---|
BatchDims (int64 x) | |
מבנים | |
|---|---|
| tensorflow:: ops:: GatherV2:: Attrs | קובעי מאפיינים אופציונליים עבור GatherV2 . |
מאפיינים ציבוריים
מִבצָע
Operation operation
תְפוּקָה
::tensorflow::Output output
תפקידים ציבוריים
GatherV2
GatherV2( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices, ::tensorflow::Input axis )
GatherV2
GatherV2( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices, ::tensorflow::Input axis, const GatherV2::Attrs & attrs )
צוֹמֶת
::tensorflow::Node * node() const
אופרטור::tensorflow::קלט
operator::tensorflow::Input() const
אופרטור::tensorflow::פלט
operator::tensorflow::Output() const
פונקציות סטטיות ציבוריות
קבוצות דימויים
Attrs BatchDims( int64 x )
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2026-11-05 (שעון UTC).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2026-11-05 (שעון UTC)."],[],[]]