<!--
{
  "availability" : [
    "iOS: 14.0.0 - 17.0.0",
    "iPadOS: 14.0.0 - 17.0.0",
    "macCatalyst: 14.0.0 - 17.0.0",
    "macOS: 11.0.0 - 14.0.0",
    "tvOS: 14.0.0 - 17.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "MLCompute",
  "identifier" : "/documentation/MLCompute/MLCPoolingDescriptor/init(type:kernelSizes:strides:dilationRates:paddingPolicy:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "ML Compute",
      "MLCompute"
    ],
    "preciseIdentifier" : "s:So20MLCPoolingDescriptorC9MLComputeE4type11kernelSizes7strides13dilationRates13paddingPolicyAbC0A4TypeO_Si6height_Si5widthtSi1y_Si1xtSiAM_SiANtAC010MLCPaddingK0Otcfc"
  },
  "title" : "init(type:kernelSizes:strides:dilationRates:paddingPolicy:)"
}
-->

# 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.

```
convenience init(type: MLCPoolingType, kernelSizes: (height: Int, width: Int), strides: (y: Int, x: Int) = (y: 1, x: 1), dilationRates: (y: Int, x: Int) = (y: 1, x: 1), paddingPolicy: MLCPaddingPolicy = .same)
```

## Parameters

`type`

The pooling function type.

`kernelSizes`

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

`strides`

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

`dilationRates`

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

`paddingPolicy`

The padding policy.

---

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)