tensorflow:: ops:: מחיצה דינמית
#include <data_flow_ops.h> מחלק data לטנזורים של num_partitions באמצעות אינדקסים partitions .
תַקצִיר
עבור כל טאפל אינדקס js בגודל partitions.ndim , data[js, ...] הופכים לחלק מ- outputs[partitions[js]] . הפרוסות עם partitions[js] = i ממוקמות ב- outputs[i] בסדר לקסיקוגרפי של js , והממד הראשון של outputs[i] הוא מספר הערכים partitions השווים ל- i . בפירוט,
outputs[i].shape = [sum(partitions == i)] + data.shape[partitions.ndim:]
outputs[i] = pack([data[js, ...] for js if partitions[js] == i])
data.shape חייבת להתחיל ב- partitions.shape .
לְדוּגמָה:
# Scalar partitions.
partitions = 1
num_partitions = 2
data = [10, 20]
outputs[0] = [] # Empty with shape [0, 2]
outputs[1] = [[10, 20]] # Vector partitions.
partitions = [0, 0, 1, 1, 0]
num_partitions = 2
data = [10, 20, 30, 40, 50]
outputs[0] = [10, 20, 50]
outputs[1] = [30, 40] ראה dynamic_stitch לדוגמה כיצד למזג מחיצות בחזרה.

טיעונים:
- היקף: אובייקט היקף
- מחיצות: כל צורה. אינדקסים בטווח
[0, num_partitions). - num_partitions: מספר המחיצות לפלט.
החזרות:
-
OutputList: טנזור הפלט.
בנאים והורסים | |
|---|---|
DynamicPartition (const :: tensorflow::Scope & scope, :: tensorflow::Input data, :: tensorflow::Input partitions, int64 num_partitions) |
מאפיינים ציבוריים | |
|---|---|
operation | |
outputs | |
תפקידים ציבוריים | |
|---|---|
operator[] (size_t index) const | |
מאפיינים ציבוריים
מִבצָע
Operation operation
תפוקות
::tensorflow::OutputList outputs
תפקידים ציבוריים
מחיצה דינמית
DynamicPartition( const ::tensorflow::Scope & scope, ::tensorflow::Input data, ::tensorflow::Input partitions, int64 num_partitions )
מַפעִיל[]
::tensorflow::Output operator[]( size_t index ) const
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2026-11-05 (שעון UTC).
[null,null,["עדכון אחרון: 2026-11-05 (שעון UTC)."],[],[]]