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:: MaxPool
#include <nn_ops.h>
Thực hiện tổng hợp tối đa trên đầu vào.
Bản tóm tắt
Lập luận:
- phạm vi: Một đối tượng Phạm vi
- đầu vào: Đầu vào 4-D để gộp lại.
- ksize: Kích thước của cửa sổ cho từng chiều của tensor đầu vào.
- bước tiến: Bước tiến của cửa sổ trượt cho từng chiều của tensor đầu vào.
- phần đệm: Loại thuật toán đệm sẽ sử dụng.
Thuộc tính tùy chọn (xem Attrs
):
- data_format: Chỉ định định dạng dữ liệu của dữ liệu đầu vào và đầu ra. Với định dạng mặc định "NHWC", dữ liệu được lưu trữ theo thứ tự: [batch, in_height, in_width, in_channels]. Ngoài ra, định dạng có thể là "NCHW", thứ tự lưu trữ dữ liệu là: [batch, in_channels, in_height, in_width].
Trả về:
-
Output
: Tenor đầu ra gộp tối đa.
Thuộc tính công khai
Chức năng công cộng
MaxPool
MaxPool(
const ::tensorflow::Scope & scope,
::tensorflow::Input input,
const gtl::ArraySlice< int > & ksize,
const gtl::ArraySlice< int > & strides,
StringPiece padding
)
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
Attrs DataFormat(
StringPiece 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-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[],[],null,["# tensorflow::ops::MaxPool Class Reference\n\ntensorflow::ops::MaxPool\n========================\n\n`#include \u003cnn_ops.h\u003e`\n\nPerforms max pooling on the input.\n\nSummary\n-------\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- input: 4-D input to pool over.\n- ksize: The size of the window for each dimension of the input tensor.\n- strides: The stride of the sliding window for each dimension of the input tensor.\n- padding: The type of padding algorithm to use.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/max-pool/attrs#structtensorflow_1_1ops_1_1_max_pool_1_1_attrs)):\n\n- data_format: Specify the data format of the input and output data. With the default format \"NHWC\", the data is stored in the order of: \\[batch, in_height, in_width, in_channels\\]. Alternatively, the format could be \"NCHW\", the data storage order of: \\[batch, in_channels, in_height, in_width\\].\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The max pooled output tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [MaxPool](#classtensorflow_1_1ops_1_1_max_pool_1a85c264b2e8ed1e7031e9e4692ea8af7c)`(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)` input, const gtl::ArraySlice\u003c int \u003e & ksize, const gtl::ArraySlice\u003c int \u003e & strides, StringPiece padding)` ||\n| [MaxPool](#classtensorflow_1_1ops_1_1_max_pool_1acb5b1aa4ace59a30fba3bc4181dbc4ff)`(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)` input, const gtl::ArraySlice\u003c int \u003e & ksize, const gtl::ArraySlice\u003c int \u003e & strides, StringPiece padding, const `[MaxPool::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/max-pool/attrs#structtensorflow_1_1ops_1_1_max_pool_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|--------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_max_pool_1aa2739bb33bb12350d02960466baf596e) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_max_pool_1aad19527c00a49d78119e18772098c1b3) | `::`[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_max_pool_1af4523c29c71806e2dbd3c1137bc875b9)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_max_pool_1a9a8f1258cb38b51df4ba77452dd41eff)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_max_pool_1a6ff803d407d19f2e5c2048399a781ee6)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|--------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------|\n| [DataFormat](#classtensorflow_1_1ops_1_1_max_pool_1a0849cb3a4a5b5191cae18dc8825701ef)`(StringPiece x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/max-pool/attrs#structtensorflow_1_1ops_1_1_max_pool_1_1_attrs) |\n\n| ### Structs ||\n|-----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::MaxPool::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/max-pool/attrs) | Optional attribute setters for [MaxPool](/versions/r1.15/api_docs/cc/class/tensorflow/ops/max-pool#classtensorflow_1_1ops_1_1_max_pool). |\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### MaxPool\n\n```gdscript\n MaxPool(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n const gtl::ArraySlice\u003c int \u003e & ksize,\n const gtl::ArraySlice\u003c int \u003e & strides,\n StringPiece padding\n)\n``` \n\n### MaxPool\n\n```gdscript\n MaxPool(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n const gtl::ArraySlice\u003c int \u003e & ksize,\n const gtl::ArraySlice\u003c int \u003e & strides,\n StringPiece padding,\n const MaxPool::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### DataFormat\n\n```text\nAttrs DataFormat(\n StringPiece x\n)\n```"]]