@frozen
public struct MaxPool2D<Scalar> : ParameterlessLayer where Scalar : TensorFlowFloatingPoint
A max pooling layer for spatial data.
-
Declaration
public typealias TangentVector = EmptyTangentVector
-
The size of the sliding reduction window for pooling.
Declaration
@noDerivative public let poolSize: (Int, Int, Int, Int)
-
The strides of the sliding window for each dimension of a 4-D input. Strides in non-spatial dimensions must be
1
.Declaration
@noDerivative public let strides: (Int, Int, Int, Int)
-
The padding algorithm for pooling.
Declaration
@noDerivative public let padding: Padding
-
Creates a max pooling layer.
Declaration
public init(poolSize: (Int, Int, Int, Int), strides: (Int, Int, Int, Int), padding: Padding)
-
Creates a max pooling layer.
Declaration
public init(poolSize: (Int, Int), strides: (Int, Int), padding: Padding = .valid)
Parameters
poolSize
Vertical and horizontal factors by which to downscale.
strides
The strides.
padding
The padding.