AdaptiveMaxPool2D

public struct AdaptiveMaxPool2D<Element, Device> : LayerType, Codable where Element : NumericType, Device : DeviceType

A 2D adaptive max pooling layer that pools its inputs with an automatically computed stride and window size to reach the desired output size

  • Declaration

    Swift

    public var parameterPaths: [WritableKeyPath<`Self`, Tensor<Element, Device>>] { get }
  • Declaration

    Swift

    public var parameters: [Tensor<Element, Device>] { get }
  • Width and height of the output tensor

    Declaration

    Swift

    public let targetSize: Int
  • A 2D adaptive max pooling layer that pools its inputs with an automatically computed stride and window size to reach the desired output size

    Declaration

    Swift

    public init(targetSize: Int)

    Parameters

    targetSize

    Width and height of the output tensor

  • Declaration

    Swift

    public func callAsFunction(_ inputs: Tensor<Element, Device>) -> Tensor<Element, Device>