<!--
{
  "availability" : [
    "iOS: 14.0.0 - 17.4.0",
    "iPadOS: 14.0.0 - 17.4.0",
    "macCatalyst: 14.0.0 - 17.4.0",
    "macOS: 11.0.0 - 14.3.0",
    "tvOS: 14.0.0 - 17.4.0"
  ],
  "documentType" : "symbol",
  "framework" : "MLCompute",
  "identifier" : "/documentation/MLCompute/MLCPoolingDescriptor",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "ML Compute"
    ],
    "preciseIdentifier" : "c:objc(cs)MLCPoolingDescriptor"
  },
  "title" : "MLCPoolingDescriptor"
}
-->

# MLCPoolingDescriptor

A configuration object you use to create a pooling layer.

```
class MLCPoolingDescriptor
```

## Topics

### Creating Pooling Descriptors

[`init(type:kernelSizes:strides:dilationRates:paddingPolicy:)`](/documentation/MLCompute/MLCPoolingDescriptor/init(type:kernelSizes:strides:dilationRates:paddingPolicy:))

Creates a pooling descriptor with the pooling function type, kernel sizes, strides, dilation rates, and padding policy that you specify.

[`maxPoolingDescriptorWithKernelSizes:strides:paddingPolicy:paddingSizes:`](/documentation/MLCompute/MLCPoolingDescriptor/maxPoolingDescriptorWithKernelSizes:strides:paddingPolicy:paddingSizes:)

Creates a descriptor for a max pooling function with the kernel sizes, strides, padding policy, and padding sizes that you specify.

[`maxPoolingDescriptorWithKernelSizes:strides:dilationRates:paddingPolicy:paddingSizes:`](/documentation/MLCompute/MLCPoolingDescriptor/maxPoolingDescriptorWithKernelSizes:strides:dilationRates:paddingPolicy:paddingSizes:)

Creates a descriptor for a max pooling function with the kernel sizes, strides, dilation rates, padding policy, and padding sizes that you specify.

[`averagePoolingDescriptorWithKernelSizes:strides:paddingPolicy:paddingSizes:countIncludesPadding:`](/documentation/MLCompute/MLCPoolingDescriptor/averagePoolingDescriptorWithKernelSizes:strides:paddingPolicy:paddingSizes:countIncludesPadding:)

Creates an average pooling descriptor with the kernel sizes, strides, padding policy, padding sizes, and zero padding option that you specify.

[`averagePoolingDescriptorWithKernelSizes:strides:dilationRates:paddingPolicy:paddingSizes:countIncludesPadding:`](/documentation/MLCompute/MLCPoolingDescriptor/averagePoolingDescriptorWithKernelSizes:strides:dilationRates:paddingPolicy:paddingSizes:countIncludesPadding:)

Creates an average pooling descriptor with the kernel sizes, strides, dilution rates, padding policy and sizes, and zero padding option you specify.

[`l2NormPoolingDescriptorWithKernelSizes:strides:paddingPolicy:paddingSizes:`](/documentation/MLCompute/MLCPoolingDescriptor/l2NormPoolingDescriptorWithKernelSizes:strides:paddingPolicy:paddingSizes:)

Creates a descriptor for an L2 norm pooling function with the kernel sizes, strides, padding policy, and padding sizes that you specify.

[`l2NormPoolingDescriptorWithKernelSizes:strides:dilationRates:paddingPolicy:paddingSizes:`](/documentation/MLCompute/MLCPoolingDescriptor/l2NormPoolingDescriptorWithKernelSizes:strides:dilationRates:paddingPolicy:paddingSizes:)

Creates a descriptor for an L2 norm pooling function with the kernel sizes, strides, dilation rates, padding policy, and padding sizes you specify.

[`poolingDescriptorWithType:kernelSize:stride:`](/documentation/MLCompute/MLCPoolingDescriptor/poolingDescriptorWithType:kernelSize:stride:)

Creates a pooling descriptor with the pooling function, kernel size, and stride you specify.

### Inspecting Pooling Descriptors

[`poolingType`](/documentation/MLCompute/MLCPoolingDescriptor/poolingType-4ni07)

The pooling operation type.

[`kernelSizes`](/documentation/MLCompute/MLCPoolingDescriptor/kernelSizes)

A tuple that contains the kernel sizes for height and width.

[`strides`](/documentation/MLCompute/MLCPoolingDescriptor/strides)

A tuple that contains the kernel strides for y and x.

[`dilationRates`](/documentation/MLCompute/MLCPoolingDescriptor/dilationRates)

A tuple that contains the dilation rates for y and x.

[`paddingPolicy`](/documentation/MLCompute/MLCPoolingDescriptor/paddingPolicy-7p8a2)

The padding policy.

[`poolingType`](/documentation/MLCompute/MLCPoolingDescriptor/poolingType-9daku)

The pooling operation type.

[`kernelWidth`](/documentation/MLCompute/MLCPoolingDescriptor/kernelWidth)

The pooling kernel size in x.

[`kernelHeight`](/documentation/MLCompute/MLCPoolingDescriptor/kernelHeight)

The pooling kernel size in y.

[`strideInX`](/documentation/MLCompute/MLCPoolingDescriptor/strideInX)

The stride of the kernel in x.

[`strideInY`](/documentation/MLCompute/MLCPoolingDescriptor/strideInY)

The stride of the kernel in y.

[`dilationRateInX`](/documentation/MLCompute/MLCPoolingDescriptor/dilationRateInX)

The kernel dilation rate, or stride of elements, in x.

[`dilationRateInY`](/documentation/MLCompute/MLCPoolingDescriptor/dilationRateInY)

The kernel dilation rate, or stride of elements, in y.

[`paddingPolicy`](/documentation/MLCompute/MLCPoolingDescriptor/paddingPolicy-1e6rg)

The padding policy.

[`paddingSizeInX`](/documentation/MLCompute/MLCPoolingDescriptor/paddingSizeInX)

The padding size in x, left and right, to use if the padding policy is to use padding size.

[`paddingSizeInY`](/documentation/MLCompute/MLCPoolingDescriptor/paddingSizeInY)

The padding size in y, top and bottom, to use if the padding policy is to use padding size.

[`countIncludesPadding`](/documentation/MLCompute/MLCPoolingDescriptor/countIncludesPadding)

A Boolean that indicates whether you include zero padding in the averaging calculation.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)