<!--
{
  "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/MLCConvolutionDescriptor",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "ML Compute"
    ],
    "preciseIdentifier" : "c:objc(cs)MLCConvolutionDescriptor"
  },
  "title" : "MLCConvolutionDescriptor"
}
-->

# MLCConvolutionDescriptor

A configuration object you use to create a convolution or fully connected layer.

```
class MLCConvolutionDescriptor
```

## Topics

### Creating Convolution Descriptors

[`init(type:kernelSizes:inputFeatureChannelCount:outputFeatureChannelCount:groupCount:strides:dilationRates:paddingPolicy:)`](/documentation/MLCompute/MLCConvolutionDescriptor/init(type:kernelSizes:inputFeatureChannelCount:outputFeatureChannelCount:groupCount:strides:dilationRates:paddingPolicy:))

Creates a descriptor for the type, sizes, number of feature channels, group count, strides, dilation rates, and padding policy you specify.

[`descriptorWithKernelWidth:kernelHeight:inputFeatureChannelCount:outputFeatureChannelCount:`](/documentation/MLCompute/MLCConvolutionDescriptor/descriptorWithKernelWidth:kernelHeight:inputFeatureChannelCount:outputFeatureChannelCount:)

Creates a convolution descriptor with the kernel sizes and number of feature channels you specify.

[`descriptorWithType:kernelSizes:inputFeatureChannelCount:outputFeatureChannelCount:groupCount:strides:dilationRates:paddingPolicy:paddingSizes:`](/documentation/MLCompute/MLCConvolutionDescriptor/descriptorWithType:kernelSizes:inputFeatureChannelCount:outputFeatureChannelCount:groupCount:strides:dilationRates:paddingPolicy:paddingSizes:)

Creates a descriptor with the type, kernel sizes, number of feature channels and groups, strides, dilation rates, and padding policy you specify.

[`descriptorWithKernelSizes:inputFeatureChannelCount:outputFeatureChannelCount:strides:paddingPolicy:paddingSizes:`](/documentation/MLCompute/MLCConvolutionDescriptor/descriptorWithKernelSizes:inputFeatureChannelCount:outputFeatureChannelCount:strides:paddingPolicy:paddingSizes:)

Creates a convolution descriptor with the kernel sizes, number of feature channels, strides, padding policy, and padding sizes you specify.

[`init(transposeWithKernelWidth:kernelHeight:inputFeatureChannelCount:outputFeatureChannelCount:)`](/documentation/MLCompute/MLCConvolutionDescriptor/init(transposeWithKernelWidth:kernelHeight:inputFeatureChannelCount:outputFeatureChannelCount:))

Creates a descriptor for convolution transpose with the kernel sizes and number of feature channels you specify.

[`convolutionTransposeDescriptorWithKernelSizes:inputFeatureChannelCount:outputFeatureChannelCount:strides:paddingPolicy:paddingSizes:`](/documentation/MLCompute/MLCConvolutionDescriptor/convolutionTransposeDescriptorWithKernelSizes:inputFeatureChannelCount:outputFeatureChannelCount:strides:paddingPolicy:paddingSizes:)

Creates a convolution transpose descriptor with the kernel sizes, number of feature channels, strides, and padding options you specify.

[`convolutionTransposeDescriptorWithKernelSizes:inputFeatureChannelCount:outputFeatureChannelCount:groupCount:strides:dilationRates:paddingPolicy:paddingSizes:`](/documentation/MLCompute/MLCConvolutionDescriptor/convolutionTransposeDescriptorWithKernelSizes:inputFeatureChannelCount:outputFeatureChannelCount:groupCount:strides:dilationRates:paddingPolicy:paddingSizes:)

Creates a convolution transpose descriptor with the kernel and padding options, number of feature channels and groups, and dilation rates you specify.

[`init(depthwiseWithKernelWidth:kernelHeight:inputFeatureChannelCount:channelMultiplier:)`](/documentation/MLCompute/MLCConvolutionDescriptor/init(depthwiseWithKernelWidth:kernelHeight:inputFeatureChannelCount:channelMultiplier:))

Creates a descriptor for depthwise convolution with the kernel sizes, number of input feature channels, and channel multiplier you specify.

[`depthwiseConvolutionDescriptorWithKernelSizes:inputFeatureChannelCount:channelMultiplier:strides:paddingPolicy:paddingSizes:`](/documentation/MLCompute/MLCConvolutionDescriptor/depthwiseConvolutionDescriptorWithKernelSizes:inputFeatureChannelCount:channelMultiplier:strides:paddingPolicy:paddingSizes:)

Creates a depthwise convolution descriptor with the kernel and padding options, number of input feature channels, and channel multiplier you specify.

[`depthwiseConvolutionDescriptorWithKernelSizes:inputFeatureChannelCount:channelMultiplier:strides:dilationRates:paddingPolicy:paddingSizes:`](/documentation/MLCompute/MLCConvolutionDescriptor/depthwiseConvolutionDescriptorWithKernelSizes:inputFeatureChannelCount:channelMultiplier:strides:dilationRates:paddingPolicy:paddingSizes:)

Creates a convolution descriptor with the kernel and padding options, number of input channels, channel multiplier, and dilation rates you specify.

[`descriptorWithKernelSizes:inputFeatureChannelCount:outputFeatureChannelCount:groupCount:strides:dilationRates:paddingPolicy:paddingSizes:`](/documentation/MLCompute/MLCConvolutionDescriptor/descriptorWithKernelSizes:inputFeatureChannelCount:outputFeatureChannelCount:groupCount:strides:dilationRates:paddingPolicy:paddingSizes:)

Creates a convolution descriptor with the kernel and padding options, number of feature channels and groups, and dilation rates you specify.

[`MLCConvolutionType`](/documentation/MLCompute/MLCConvolutionType)

The convolution type specified for a convolution layer.

### Inspecting Convolution Descriptors

[`convolutionType`](/documentation/MLCompute/MLCConvolutionDescriptor/convolutionType)

The type of convolution.

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

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

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

The kernel size in x.

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

The kernel size in y.

[`inputFeatureChannelCount`](/documentation/MLCompute/MLCConvolutionDescriptor/inputFeatureChannelCount)

The number of feature channels in the input tensor.

[`outputFeatureChannelCount`](/documentation/MLCompute/MLCConvolutionDescriptor/outputFeatureChannelCount)

The number of feature channels in the output tensor.

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

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

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

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

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

The kernel stride in `x`.

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

The kernel stride in `y`.

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

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

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

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

[`groupCount`](/documentation/MLCompute/MLCConvolutionDescriptor/groupCount)

The number of groups.

[`paddingPolicy`](/documentation/MLCompute/MLCConvolutionDescriptor/paddingPolicy-61tq3)

The padding policy.

[`paddingPolicy`](/documentation/MLCompute/MLCConvolutionDescriptor/paddingPolicy-7drfq)

The padding policy.

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

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

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

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

[`isConvolutionTranspose`](/documentation/MLCompute/MLCConvolutionDescriptor/isConvolutionTranspose)

A Boolean that indicates whether this is a convolution transpose.

[`usesDepthwiseConvolution`](/documentation/MLCompute/MLCConvolutionDescriptor/usesDepthwiseConvolution)

A Boolean that indicates whether you use depthwise convolution.



---

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)