tensorflow:: אופס:: DynamicPartition
#include <data_flow_ops.h> מחלק data לטנזורים num_partitions באמצעות מדדים partitions .
תַקצִיר
 עבור כל אינדקס tuple 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 לדוגמא כיצד למזג מחיצות בחזרה.

טיעונים:
- scope: אובייקט Scope
-  מחיצות: כל צורה. מדדים בטווח [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
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 ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
  
  
    
      [null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[],[]]