maxPool2d

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

Creates a 2D max 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)

id

Optional identifier for the layer


open override fun maxPool2d(id: String, content: MAXPOOL2D<T, V>.() -> Unit)(source)

Creates a 2D max pooling layer with all parameters configured inside the DSL block. Example: maxPool2d("pool1") { kernelSize(2) stride(2) padding(0) }