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:: Người đọcĐọcLên
#include <io_ops.h>
Trả về tối đa cặp num_records
(khóa, giá trị) do Reader tạo ra.
Bản tóm tắt
Sẽ loại bỏ hàng đợi đầu vào nếu cần thiết (ví dụ: khi Reader cần bắt đầu đọc từ một tệp mới vì nó đã kết thúc với tệp trước đó). Nó có thể trả về ít hơn num_records
ngay cả trước đợt cuối cùng.
Lập luận:
- phạm vi: Một đối tượng phạm vi
- reader_handle: Xử lý cho
Reader
. - queue_handle: Xử lý một
Queue
, với các mục công việc dạng chuỗi. - num_records: số bản ghi cần đọc từ
Reader
.
Trả về:
- Phím
Output
: Một tensor 1-D. - Giá trị
Output
: Một tensor 1-D.
Thuộc tính công khai
Chức năng công cộng
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::ReaderReadUpTo Class Reference\n\ntensorflow::ops::ReaderReadUpTo\n===============================\n\n`#include \u003cio_ops.h\u003e`\n\nReturns up to `num_records` (key, value) pairs produced by a Reader.\n\nSummary\n-------\n\nWill dequeue from the input queue if necessary (e.g. when the Reader needs to start reading from a new file since it has finished with the previous file). It may return less than `num_records` even before the last batch.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- reader_handle: Handle to a `Reader`.\n- queue_handle: Handle to a `Queue`, with string work items.\n- num_records: number of records to read from `Reader`.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) keys: A 1-D tensor.\n- [Output](/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) values: A 1-D tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [ReaderReadUpTo](#classtensorflow_1_1ops_1_1_reader_read_up_to_1a2ec15832620e45ab0ea0a17f650cb1f5)`(const ::`[tensorflow::Scope](/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` reader_handle, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` queue_handle, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` num_records)` ||\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [keys](#classtensorflow_1_1ops_1_1_reader_read_up_to_1af7a8295467508f82a27607fc8f67ed71) | `::`[tensorflow::Output](/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_reader_read_up_to_1a5b7389ad7ab4f4d1dc2c976d3dd52e9e) | [Operation](/versions/r2.3/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [values](#classtensorflow_1_1ops_1_1_reader_read_up_to_1abb8bf94a488824b08dc38f935f62a0be) | `::`[tensorflow::Output](/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\nPublic attributes\n-----------------\n\n### keys\n\n```text\n::tensorflow::Output keys\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\n### values\n\n```text\n::tensorflow::Output values\n``` \n\nPublic functions\n----------------\n\n### ReaderReadUpTo\n\n```gdscript\n ReaderReadUpTo(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input reader_handle,\n ::tensorflow::Input queue_handle,\n ::tensorflow::Input num_records\n)\n```"]]