See more details in :ref:`api_nn_pooling_AvgPool1d` .
See more details in :ref:`api_nn_pooling_AvgPool1d` .
...
@@ -280,7 +280,7 @@ def avg_pool2d(x,
...
@@ -280,7 +280,7 @@ def avg_pool2d(x,
"""
"""
This API implements average pooling 2d operation.
This API implements average pooling 2d operation.
See more details in :ref:`api_nn_pooling_AvgPool2d` .
See more details in :ref:`api_nn_pooling_AvgPool2d` .
Args:
Args:
x (Tensor): The input tensor of pooling operator which is a 4-D tensor with
x (Tensor): The input tensor of pooling operator which is a 4-D tensor with
shape [N, C, H, W]. The format of input tensor is `"NCHW"` or
shape [N, C, H, W]. The format of input tensor is `"NCHW"` or
...
@@ -640,7 +640,7 @@ def max_pool2d(x,
...
@@ -640,7 +640,7 @@ def max_pool2d(x,
5. A list or tuple of pairs of integers. It has the form [[pad_before, pad_after], [pad_before, pad_after], ...]. Note that, the batch dimension and channel dimension should be [0,0] or (0,0).
5. A list or tuple of pairs of integers. It has the form [[pad_before, pad_after], [pad_before, pad_after], ...]. Note that, the batch dimension and channel dimension should be [0,0] or (0,0).
The default value is 0.
The default value is 0.
ceil_mode (bool): when True, will use `ceil` instead of `floor` to compute the output shape
ceil_mode (bool): when True, will use `ceil` instead of `floor` to compute the output shape
return_indices (bool): Whether to return the max indices along with the outputs.
return_indices (bool): Whether to return the max indices along with the outputs. Default False, only support `"NCHW"` data format
data_format (string): The data format of the input and output data. An optional string from: `"NCHW"`, `"NHWC"`.
data_format (string): The data format of the input and output data. An optional string from: `"NCHW"`, `"NHWC"`.
The default is `"NCHW"`. When it is `"NCHW"`, the data is stored in the order of:
The default is `"NCHW"`. When it is `"NCHW"`, the data is stored in the order of:
See more details in :ref:`api_nn_pooling_MaxPool3d` .
See more details in :ref:`api_nn_pooling_MaxPool3d` .
Args:
Args:
x (Tensor): The input tensor of pooling operator, which is a 5-D tensor with
x (Tensor): The input tensor of pooling operator, which is a 5-D tensor with
shape [N, C, D, H, W]. The format of input tensor is `"NCDHW"` or `"NDHWC"`, where N represents batch size, C represents the number of channels, D, H and W represent the depth, height and width of the feature respectively.
shape [N, C, D, H, W]. The format of input tensor is `"NCDHW"` or `"NDHWC"`, where N represents batch size, C represents the number of channels, D, H and W represent the depth, height and width of the feature respectively.
kernel_size (int|list|tuple): The pool kernel size. If the kernel size
kernel_size (int|list|tuple): The pool kernel size. If the kernel size
is a tuple or list, it must contain three integers,
is a tuple or list, it must contain three integers,
5. A list or tuple of pairs of integers. It has the form [[pad_before, pad_after], [pad_before, pad_after], ...]. Note that, the batch dimension and channel dimension should be [0,0] or (0,0).
5. A list or tuple of pairs of integers. It has the form [[pad_before, pad_after], [pad_before, pad_after], ...]. Note that, the batch dimension and channel dimension should be [0,0] or (0,0).
The default value is 0.
The default value is 0.
ceil_mode (bool): ${ceil_mode_comment}
ceil_mode (bool): ${ceil_mode_comment}
return_indices (bool): Whether to return the max indices along with the outputs.
return_indices (bool): Whether to return the max indices along with the outputs. Default False. Only support "NDCHW" data_format.
data_format (string): The data format of the input and output data. An optional string from: `"NCDHW"`, `"NDHWC"`.
data_format (string): The data format of the input and output data. An optional string from: `"NCDHW"`, `"NDHWC"`.
The default is `"NCDHW"`. When it is `"NCDHW"`, the data is stored in the order of:
The default is `"NCDHW"`. When it is `"NCDHW"`, the data is stored in the order of: