This layer applies an adaptive max pooling operation, which pools the
input such that the output has a target spatial size specified by
output_size, regardless of the input spatial size. The kernel size
and stride are automatically computed to achieve the target output size.
Args
output_size
Integer or tuple of 3 integers specifying the
target output size.
If an integer, the same value is used for depth, height, and width.
data_format
string, either "channels_last" or "channels_first".
"channels_last" corresponds to inputs with shape
(batch, depth, height, width, channels).
"channels_first" corresponds to inputs with shape
(batch, channels, depth, height, width).
Defaults to the value found in your Keras config file at
~/.keras/keras.json. If never set, "channels_last" is used.
Input shape
If data_format="channels_last": 5D tensor
(batch_size, depth, height, width, channels)
If data_format="channels_first": 5D tensor
(batch_size, channels, depth, height, width)
Output shape
If data_format="channels_last":
(batch_size, output_depth, output_height, output_width, channels)
If data_format="channels_first":
(batch_size, channels, output_depth, output_height, output_width)
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-10-31 UTC."],[],[]]