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:: Hàng đợiDequeueNhiều
#include <data_flow_ops.h>
Xếp hàng n
bộ của một hoặc nhiều tensor từ hàng đợi đã cho.
Bản tóm tắt
Nếu hàng đợi bị đóng và có ít hơn n
phần tử thì sẽ trả về lỗi OutOfRange.
Hoạt động này nối các tensor thành phần phần tử hàng đợi dọc theo chiều thứ 0 để tạo thành một tensor thành phần duy nhất. Tất cả các thành phần trong bộ dữ liệu được xếp hàng đợi sẽ có kích thước n
ở chiều thứ 0.
Hoạt động này có k
kết quả đầu ra, trong đó k
là số thành phần trong các bộ dữ liệu được lưu trữ trong hàng đợi nhất định và đầu ra i
là thành phần thứ i của bộ dữ liệu đã loại bỏ hàng đợi.
NB Nếu hàng đợi trống, thao tác này sẽ chặn cho đến khi n
phần tử được loại bỏ (hoặc 'timeout_ms' trôi qua, nếu được chỉ định).
Lập luận:
- phạm vi: Một đối tượng Phạm vi
- xử lý: Xử lý cho một hàng đợi.
- n: Số lượng bộ cần dequeue.
- thành phần_types: Loại của từng thành phần trong một bộ dữ liệu.
Thuộc tính tùy chọn (xem Attrs
):
- timeout_ms: Nếu hàng đợi có ít hơn n phần tử, thao tác này sẽ chặn tối đa timeout_ms mili giây. Lưu ý: Tùy chọn này chưa được hỗ trợ.
Trả về:
-
OutputList
: Một hoặc nhiều tensor được xếp hàng đợi dưới dạng tuple.
Chức năng công cộng |
---|
operator[] (size_t index) const | |
Thuộc tính công khai
Chức năng công cộng
Các hàm tĩnh công khai
Hết thời gianMs
Attrs TimeoutMs(
int64 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-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[],[],null,["# tensorflow::ops::QueueDequeueMany Class Reference\n\ntensorflow::ops::QueueDequeueMany\n=================================\n\n`#include \u003cdata_flow_ops.h\u003e`\n\nDequeues `n` tuples of one or more tensors from the given queue.\n\nSummary\n-------\n\nIf the queue is closed and there are fewer than `n` elements, then an OutOfRange error is returned.\n\nThis operation concatenates queue-element component tensors along the 0th dimension to make a single component tensor. [All](/versions/r1.15/api_docs/cc/class/tensorflow/ops/all#classtensorflow_1_1ops_1_1_all) of the components in the dequeued tuple will have size `n` in the 0th dimension.\n\nThis operation has `k` outputs, where `k` is the number of components in the tuples stored in the given queue, and output `i` is the ith component of the dequeued tuple.\n\nN.B. If the queue is empty, this operation will block until `n` elements have been dequeued (or 'timeout_ms' elapses, if specified).\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- handle: The handle to a queue.\n- n: The number of tuples to dequeue.\n- component_types: The type of each component in a tuple.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/queue-dequeue-many/attrs#structtensorflow_1_1ops_1_1_queue_dequeue_many_1_1_attrs)):\n\n- timeout_ms: If the queue has fewer than n elements, this operation will block for up to timeout_ms milliseconds. Note: This option is not supported yet.\n\n\u003cbr /\u003e\n\nReturns:\n\n- `OutputList`: One or more tensors that were dequeued as a tuple.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [QueueDequeueMany](#classtensorflow_1_1ops_1_1_queue_dequeue_many_1af0787d738d8e5c2f19921973db8e2481)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` handle, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` n, const DataTypeSlice & component_types)` ||\n| [QueueDequeueMany](#classtensorflow_1_1ops_1_1_queue_dequeue_many_1a8d1c93762d52332bf32cf0affcf42447)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` handle, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` n, const DataTypeSlice & component_types, const `[QueueDequeueMany::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/queue-dequeue-many/attrs#structtensorflow_1_1ops_1_1_queue_dequeue_many_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------|\n| [components](#classtensorflow_1_1ops_1_1_queue_dequeue_many_1ad008417bd88a61cc3561b12b2655e192) | `::`[tensorflow::OutputList](/versions/r1.15/api_docs/cc/group/core#group__core_1gab449e6a3abd500c2f4ea93f9e89ba96c) |\n| [operation](#classtensorflow_1_1ops_1_1_queue_dequeue_many_1a8022cd22dda1a2ece65d36a11766035d) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n\n| ### Public functions ||\n|------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operator[]](#classtensorflow_1_1ops_1_1_queue_dequeue_many_1a3b9da4a9019f580bd27704d37043f875)`(size_t index) const ` | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public static functions ||\n|-----------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|\n| [TimeoutMs](#classtensorflow_1_1ops_1_1_queue_dequeue_many_1ada0815fe9735c5da0a6192a13c574ee2)`(int64 x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/queue-dequeue-many/attrs#structtensorflow_1_1ops_1_1_queue_dequeue_many_1_1_attrs) |\n\n| ### Structs ||\n|------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::QueueDequeueMany::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/queue-dequeue-many/attrs) | Optional attribute setters for [QueueDequeueMany](/versions/r1.15/api_docs/cc/class/tensorflow/ops/queue-dequeue-many#classtensorflow_1_1ops_1_1_queue_dequeue_many). |\n\nPublic attributes\n-----------------\n\n### components\n\n```text\n::tensorflow::OutputList components\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### QueueDequeueMany\n\n```gdscript\n QueueDequeueMany(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input handle,\n ::tensorflow::Input n,\n const DataTypeSlice & component_types\n)\n``` \n\n### QueueDequeueMany\n\n```gdscript\n QueueDequeueMany(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input handle,\n ::tensorflow::Input n,\n const DataTypeSlice & component_types,\n const QueueDequeueMany::Attrs & attrs\n)\n``` \n\n### operator\\[\\]\n\n```gdscript\n::tensorflow::Output operator[](\n size_t index\n) const \n``` \n\nPublic static functions\n-----------------------\n\n### TimeoutMs\n\n```text\nAttrs TimeoutMs(\n int64 x\n)\n```"]]