Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
tensor akışı:: işlem:: Yığın
#include <array_ops.h>
N
dereceli R
tensörlerin bir listesini tek sıralı (R+1)
tensöre paketler.
Özet
values
N
tensörleri, axis
boyutu boyunca paketleyerek, values
her tensörden bir üst sıraya sahip bir tensöre paketler. (A, B, C)
şeklindeki tensörlerin bir listesi verildiğinde;
axis == 0
ise output
tensörü (N, A, B, C)
şekline sahip olacaktır. axis == 1
ise output
tensörü (A, N, B, C)
şeklinde olacaktır. Vesaire.
Örneğin:
# '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]]
Bu, unpack
tam tersidir.
Argümanlar:
- kapsam: Bir Kapsam nesnesi
- değerler: Aynı şekil ve türde olmalıdır.
İsteğe bağlı özellikler (bkz. Attrs
):
- eksen: Paketlenecek boyut. Negatif değerler sarılır, dolayısıyla geçerli aralık
[-(R+1), R+1)
olur.
İade:
Genel statik işlevler |
---|
Axis (int64 x) | |
Genel özellikler
Kamu işlevleri
düğüm
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operatör::tensorflow::Çıktı
operator::tensorflow::Output() const
Genel statik işlevler
Eksen
Attrs Axis(
int64 x
)
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-25 UTC.
[null,null,["Son güncelleme tarihi: 2025-07-25 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.1/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.1/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.1/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.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::InputList](/versions/r2.1/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.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::InputList](/versions/r2.1/api_docs/cc/class/tensorflow/input-list#classtensorflow_1_1_input_list)` values, const `[Stack::Attrs](/versions/r2.1/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.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_stack_1af30b0181ca359975456c27dda4c0ce4e) | `::`[tensorflow::Output](/versions/r2.1/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.1/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.1/api_docs/cc/struct/tensorflow/ops/stack/attrs) | Optional attribute setters for [Stack](/versions/r2.1/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```"]]