tensorflow:: אופס:: לַעֲרוֹם
#include <array_ops.h>
אורזת רשימה של טנסור N
rank- R
לטנסור דרג- (R+1)
אחד.
תַקצִיר
אורז את ה- N
טנסורים values
לטנזור עם דרגה אחת גבוהה יותר מכל טנסור values
, על ידי אריזה לאורך ממד axis
. נתונה רשימה של טנסורים של צורה (A, B, C)
;
אם axis == 0
אז לטנזור output
תהיה הצורה (N, A, B, C)
. אם axis == 1
אז לטנזור output
תהיה הצורה (A, N, B, C)
. וכו.
לְדוּגמָה:
# 'x' is [1, 4] # 'y' is [2, 5] # 'z' is [3, 6] pack([x, y, z]) => [[1, 4], [2, 5], [3, 6]] # Pack along first dim. pack([x, y, z], axis=1) => [[1, 2, 3], [4, 5, 6]]
זה ההפך unpack
.
טיעונים:
- scope: אובייקט Scope
- ערכים: חייבים להיות מאותו צורה וסוג.
מאפיינים אופציונליים (ראה Attrs
):
- ציר: מימד שלאורכו לארוז. ערכים שליליים עוטפים, כך שהטווח החוקי הוא
[-(R+1), R+1)
.
החזרות:
-
Output
: הטנזור הארוז.
בנאים והורסים | |
---|---|
Stack (const :: tensorflow::Scope & scope, :: tensorflow::InputList values) | |
Stack (const :: tensorflow::Scope & scope, :: tensorflow::InputList values, const Stack::Attrs & attrs) |
תכונות ציבוריות | |
---|---|
operation | |
output |
תפקידים ציבוריים | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
פונקציות סטטיות ציבוריות | |
---|---|
Axis (int64 x) |
מבנים | |
---|---|
tensorflow:: ops:: מחסנית:: Attrs | קובעי תכונות אופציונליים עבור Stack . |
תכונות ציבוריות
מִבצָע
Operation operation
תְפוּקָה
::tensorflow::Output output
תפקידים ציבוריים
לַעֲרוֹם
Stack( const ::tensorflow::Scope & scope, ::tensorflow::InputList values )
לַעֲרוֹם
Stack( const ::tensorflow::Scope & scope, ::tensorflow::InputList values, const Stack::Attrs & attrs )
צוֹמֶת
::tensorflow::Node * node() const
מפעיל::tensorflow::קלט
operator::tensorflow::Input() const
אופרטור::tensorflow::פלט
operator::tensorflow::Output() const
פונקציות סטטיות ציבוריות
צִיר
Attrs Axis( int64 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::Stack Class Reference\n\ntensorflow::ops::Stack\n======================\n\n`#include \u003carray_ops.h\u003e`\n\nPacks a list of `N` rank-`R` tensors into one rank-`(R+1)` tensor.\n\nSummary\n-------\n\nPacks the `N` tensors in `values` into a tensor with rank one higher than each tensor in `values`, by packing them along the `axis` dimension. Given a list of tensors of shape `(A, B, C)`;\n\nif `axis == 0` then the `output` tensor will have the shape `(N, A, B, C)`. if `axis == 1` then the `output` tensor will have the shape `(A, N, B, C)`. Etc.\n\nFor example:\n\n\n```text\n# 'x' is [1, 4]\n# 'y' is [2, 5]\n# 'z' is [3, 6]\npack([x, y, z]) =\u003e [[1, 4], [2, 5], [3, 6]] # Pack along first dim.\npack([x, y, z], axis=1) =\u003e [[1, 2, 3], [4, 5, 6]]\n```\n\n\u003cbr /\u003e\n\nThis is the opposite of `unpack`.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- values: Must be of same shape and type.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/stack/attrs#structtensorflow_1_1ops_1_1_stack_1_1_attrs)):\n\n- axis: Dimension along which to pack. Negative values wrap around, so the valid range is `[-(R+1), R+1)`.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.0/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The packed tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [Stack](#classtensorflow_1_1ops_1_1_stack_1aa3a6f6cc75aa0bc3e217610c4b630850)`(const ::`[tensorflow::Scope](/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::InputList](/versions/r2.0/api_docs/cc/class/tensorflow/input-list#classtensorflow_1_1_input_list)` values)` ||\n| [Stack](#classtensorflow_1_1ops_1_1_stack_1af619225abec63de439cb9ade43b936a8)`(const ::`[tensorflow::Scope](/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::InputList](/versions/r2.0/api_docs/cc/class/tensorflow/input-list#classtensorflow_1_1_input_list)` values, const `[Stack::Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/stack/attrs#structtensorflow_1_1ops_1_1_stack_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_stack_1aa46830d4c02fef768a0142707c6048d7) | [Operation](/versions/r2.0/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_stack_1af30b0181ca359975456c27dda4c0ce4e) | `::`[tensorflow::Output](/versions/r2.0/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|-----------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_stack_1a934f8ed07dd585da717a4a55f7ffec62)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_stack_1a17fdd11a1152984a35f55b52ff4753f8)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_stack_1aa93a9c40ba77fc16a19e5b1320fea39c)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|-----------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|\n| [Axis](#classtensorflow_1_1ops_1_1_stack_1a52044bc69e273453a899ab690fafc227)`(int64 x)` | [Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/stack/attrs#structtensorflow_1_1ops_1_1_stack_1_1_attrs) |\n\n| ### Structs ||\n|-----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::Stack::Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/stack/attrs) | Optional attribute setters for [Stack](/versions/r2.0/api_docs/cc/class/tensorflow/ops/stack#classtensorflow_1_1ops_1_1_stack). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::Output output\n``` \n\nPublic functions\n----------------\n\n### Stack\n\n```gdscript\n Stack(\n const ::tensorflow::Scope & scope,\n ::tensorflow::InputList values\n)\n``` \n\n### Stack\n\n```gdscript\n Stack(\n const ::tensorflow::Scope & scope,\n ::tensorflow::InputList values,\n const Stack::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### Axis\n\n```text\nAttrs Axis(\n int64 x\n)\n```"]]