avgPool2d

open override fun avgPool2d(kernelSize: Pair<Int, Int>, stride: Pair<Int, Int>, padding: Pair<Int, Int>, countIncludePad: Boolean, id: String)(source)

Creates a 2D average pooling layer for downsampling feature maps.

Parameters

kernelSize

Size of the pooling window (height, width)

stride

Stride of the pooling operation (default: same as kernelSize)

padding

Padding added to all sides of the input (default: 0, 0)

countIncludePad

Whether to include padding in the average calculation (default: true)

id

Optional identifier for the layer