Applies 2D average-pooling operation in kH∗kW regions by step size sH∗sW steps. The number of output features is equal to the number of input planes.
nn_module
Calls nn_avg_pool2d() during training.
Input and Output Channels
One input channel called "input" and one output channel called "output". For an explanation see PipeOpTorch.
State
The state is the value calculated by the public method $shapes_out().
Parameters
kernel_size :: (integer())
The size of the window. Can be a single number or a vector.
stride :: integer()
The stride of the window. Can be a single number or a vector. Default: kernel_size.
padding :: integer()
Implicit zero paddings on both sides of the input. Can be a single number or a vector. Default: 0.
ceil_mode :: integer()
When TRUE, will use ceil instead of floor to compute the output shape. Default: FALSE.
count_include_pad :: logical(1)
When TRUE, will include the zero-padding in the averaging calculation. Default: TRUE.
divisor_override :: logical(1)
If specified, it will be used as divisor, otherwise size of the pooling region will be used. Default: NULL. Only available for dimension greater than 1.
Examples
# Construct the PipeOppipeop = po("nn_avg_pool2d")pipeop
# The available parameterspipeop$param_set