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:: Song songConcat
#include <array_ops.h>
Nối một danh sách N
tensor dọc theo chiều thứ nhất.
Bản tóm tắt
Các tensor đầu vào đều bắt buộc phải có kích thước 1 ở chiều thứ nhất.
Ví dụ:
# 'x' is [[1, 4]]
# 'y' is [[2, 5]]
# 'z' is [[3, 6]]
parallel_concat([x, y, z]) => [[1, 4], [2, 5], [3, 6]] # Pack along first dim.
Sự khác biệt giữa concat và Parallel_concat là concat yêu cầu tất cả dữ liệu đầu vào phải được tính toán trước khi thao tác bắt đầu nhưng không yêu cầu phải biết hình dạng đầu vào trong quá trình xây dựng biểu đồ. Concat song song sẽ sao chép các phần của đầu vào vào đầu ra khi chúng có sẵn, trong một số trường hợp, điều này có thể mang lại lợi ích về hiệu suất.
Lập luận:
- phạm vi: Một đối tượng Phạm vi
- giá trị: Tensors được nối. Tất cả phải có kích thước 1 ở chiều thứ nhất và hình dạng giống nhau.
- hình dạng: hình dạng cuối cùng của kết quả; phải bằng hình dạng của bất kỳ đầu vào nào nhưng có số lượng giá trị đầu vào ở chiều thứ nhất.
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
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-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[],[],null,["# tensorflow::ops::ParallelConcat Class Reference\n\ntensorflow::ops::ParallelConcat\n===============================\n\n`#include \u003carray_ops.h\u003e`\n\nConcatenates a list of `N` tensors along the first dimension.\n\nSummary\n-------\n\nThe input tensors are all required to have size 1 in the first dimension.\n\nFor example:\n\n\n```scdoc\n# 'x' is [[1, 4]]\n# 'y' is [[2, 5]]\n# 'z' is [[3, 6]]\nparallel_concat([x, y, z]) =\u003e [[1, 4], [2, 5], [3, 6]] # Pack along first dim.\n```\n\n\u003cbr /\u003e\n\nThe difference between concat and parallel_concat is that concat requires all of the inputs be computed before the operation will begin but doesn't require that the input shapes be known during graph construction. Parallel concat will copy pieces of the input into the output as they become available, in some situations this can provide a performance benefit.\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- values: Tensors to be concatenated. [All](/versions/r1.15/api_docs/cc/class/tensorflow/ops/all#classtensorflow_1_1ops_1_1_all) must have size 1 in the first dimension and same shape.\n- shape: the final shape of the result; should be equal to the shapes of any input but with the number of input values in the first dimension.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The concatenated tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [ParallelConcat](#classtensorflow_1_1ops_1_1_parallel_concat_1a60020ca0a0ad9b1f1f1ab296cc49745d)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::InputList](/versions/r1.15/api_docs/cc/class/tensorflow/input-list#classtensorflow_1_1_input_list)` values, PartialTensorShape shape)` ||\n\n| ### Public attributes ||\n|---------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_parallel_concat_1af663fb0e8d0b48dbdd39c4663f6a995c) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_parallel_concat_1ad8442cea6d8145bdcdc7fa4546c3a25c) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|---------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_parallel_concat_1ac4a6ff40acbc954f1d49c80fc94645df)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_parallel_concat_1a2bf16ff17da885269b998bbd3053caea)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_parallel_concat_1ab99eff81cc7f72feedcba5cb98e7b689)`() const ` | ` ` ` ` |\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### ParallelConcat\n\n```gdscript\n ParallelConcat(\n const ::tensorflow::Scope & scope,\n ::tensorflow::InputList values,\n PartialTensorShape shape\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```"]]