Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
dòng chảy căng:: ôi:: TensorArrayTập hợp
#include <data_flow_ops.h>
Tập hợp các phần tử cụ thể từ TensorArray thành value
đầu ra.
Bản tóm tắt
Tất cả các phần tử được chọn theo indices
phải có hình dạng giống nhau.
Lập luận:
- phạm vi: Một đối tượng Phạm vi
- tay cầm: Tay cầm của TensorArray .
- chỉ mục: Các vị trí trong TensorArray để đọc các phần tử tensor.
- flow_in: Một vô hướng float thực thi chuỗi hoạt động thích hợp.
- dtype: Kiểu của phần tử được trả về.
Thuộc tính tùy chọn (xem Attrs
):
- element_shape: Hình dạng dự kiến của một phần tử, nếu biết. Được sử dụng để xác nhận hình dạng của các phần tử TensorArray . Nếu hình dạng này không được chỉ định đầy đủ thì việc thu thập TensorArrays có kích thước bằng 0 là một lỗi.
Trả về:
Thuộc tính công khai
Chức năng công cộng
nút
::tensorflow::Node * node() const
operator::tensorflow::Input() const
toán tử::tenorflow::Đầu ra
operator::tensorflow::Output() const
Các hàm tĩnh công khai
Hình dạng phần tử
Attrs ElementShape(
PartialTensorShape x
)
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-27 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-27 UTC."],[],[],null,["# tensorflow::ops::TensorArrayGather Class Reference\n\ntensorflow::ops::TensorArrayGather\n==================================\n\n`#include \u003cdata_flow_ops.h\u003e`\n\n[Gather](/versions/r2.2/api_docs/cc/class/tensorflow/ops/gather#classtensorflow_1_1ops_1_1_gather) specific elements from the [TensorArray](/versions/r2.2/api_docs/cc/class/tensorflow/ops/tensor-array#classtensorflow_1_1ops_1_1_tensor_array) into output `value`.\n\nSummary\n-------\n\n[All](/versions/r2.2/api_docs/cc/class/tensorflow/ops/all#classtensorflow_1_1ops_1_1_all) elements selected by `indices` must have the same shape.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- handle: The handle to a [TensorArray](/versions/r2.2/api_docs/cc/class/tensorflow/ops/tensor-array#classtensorflow_1_1ops_1_1_tensor_array).\n- indices: The locations in the [TensorArray](/versions/r2.2/api_docs/cc/class/tensorflow/ops/tensor-array#classtensorflow_1_1ops_1_1_tensor_array) from which to read tensor elements.\n- flow_in: A float scalar that enforces proper chaining of operations.\n- dtype: The type of the elem that is returned.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/tensor-array-gather/attrs#structtensorflow_1_1ops_1_1_tensor_array_gather_1_1_attrs)):\n\n- element_shape: The expected shape of an element, if known. Used to validate the shapes of [TensorArray](/versions/r2.2/api_docs/cc/class/tensorflow/ops/tensor-array#classtensorflow_1_1ops_1_1_tensor_array) elements. If this shape is not fully specified, gathering zero-size TensorArrays is an error.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): [All](/versions/r2.2/api_docs/cc/class/tensorflow/ops/all#classtensorflow_1_1ops_1_1_all) of the elements in the [TensorArray](/versions/r2.2/api_docs/cc/class/tensorflow/ops/tensor-array#classtensorflow_1_1ops_1_1_tensor_array), concatenated along a new axis (the new dimension 0).\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [TensorArrayGather](#classtensorflow_1_1ops_1_1_tensor_array_gather_1a217eb2eb8236b837dd4c47f33e149eb5)`(const ::`[tensorflow::Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` handle, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` indices, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` flow_in, DataType dtype)` ||\n| [TensorArrayGather](#classtensorflow_1_1ops_1_1_tensor_array_gather_1acaf1d9394750550499a9d32ab5b6be2c)`(const ::`[tensorflow::Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` handle, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` indices, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` flow_in, DataType dtype, const `[TensorArrayGather::Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/tensor-array-gather/attrs#structtensorflow_1_1ops_1_1_tensor_array_gather_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_tensor_array_gather_1a18cd26c5207c30afc37dc106c73c0862) | [Operation](/versions/r2.2/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [value](#classtensorflow_1_1ops_1_1_tensor_array_gather_1a2df8cf3f750a2eed7cb36b35f8f0ad1f) | `::`[tensorflow::Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|-------------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_tensor_array_gather_1af03efcbaca9f1f8165d39cbf23acd99f)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_tensor_array_gather_1a4c95465b1cb37303cc4b7e3dad7ad411)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_tensor_array_gather_1a1d089d1cb6fab2fda60d0fe8b086e91d)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|----------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|\n| [ElementShape](#classtensorflow_1_1ops_1_1_tensor_array_gather_1ad1d8054cb6b334d7903bda4be71a8ade)`(PartialTensorShape x)` | [Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/tensor-array-gather/attrs#structtensorflow_1_1ops_1_1_tensor_array_gather_1_1_attrs) |\n\n| ### Structs ||\n|-------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::TensorArrayGather::Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/tensor-array-gather/attrs) | Optional attribute setters for [TensorArrayGather](/versions/r2.2/api_docs/cc/class/tensorflow/ops/tensor-array-gather#classtensorflow_1_1ops_1_1_tensor_array_gather). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### value\n\n```text\n::tensorflow::Output value\n``` \n\nPublic functions\n----------------\n\n### TensorArrayGather\n\n```gdscript\n TensorArrayGather(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input handle,\n ::tensorflow::Input indices,\n ::tensorflow::Input flow_in,\n DataType dtype\n)\n``` \n\n### TensorArrayGather\n\n```gdscript\n TensorArrayGather(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input handle,\n ::tensorflow::Input indices,\n ::tensorflow::Input flow_in,\n DataType dtype,\n const TensorArrayGather::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### ElementShape\n\n```text\nAttrs ElementShape(\n PartialTensorShape x\n)\n```"]]