<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShaders",
  "identifier" : "/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Metal Performance Shaders"
    ],
    "preciseIdentifier" : "c:objc(cs)MPSCNNConvolutionDescriptor"
  },
  "title" : "MPSCNNConvolutionDescriptor"
}
-->

# MPSCNNConvolutionDescriptor

A description of the attributes of a convolution kernel.

```
class MPSCNNConvolutionDescriptor
```

## Overview

You use an [`MPSCNNConvolutionDescriptor`](/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor) object to describe the properties of an [`MPSCNNConvolution`](/documentation/MetalPerformanceShaders/MPSCNNConvolution) kernel such as its size, pixel format and CPU cache mode.

## Topics

### Initializers

### Type Methods

[`init(coder:)`](/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor/init(coder:))

[`init(kernelWidth:kernelHeight:inputFeatureChannels:outputFeatureChannels:)`](/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor/init(kernelWidth:kernelHeight:inputFeatureChannels:outputFeatureChannels:))

[`init(kernelWidth:kernelHeight:inputFeatureChannels:outputFeatureChannels:neuronFilter:)`](/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor/init(kernelWidth:kernelHeight:inputFeatureChannels:outputFeatureChannels:neuronFilter:))

Creates a convolution descriptor with an optional neuron filter.

### Instance Properties

[`groups`](/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor/groups)

The number of groups that the input and output channels are divided into.

[`inputFeatureChannels`](/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor/inputFeatureChannels)

The number of feature channels per pixel in the input image.

[`kernelHeight`](/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor/kernelHeight)

The height of the kernel window.

[`kernelWidth`](/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor/kernelWidth)

The width of the kernel window.

[`outputFeatureChannels`](/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor/outputFeatureChannels)

The number of feature channels per pixel in the output image.

[`strideInPixelsX`](/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor/strideInPixelsX)

The output stride (downsampling factor) in the x dimension.

[`strideInPixelsY`](/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor/strideInPixelsY)

The output stride (downsampling factor) in the y dimension.

[`neuron`](/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor/neuron)

The neuron filter to be applied as part of the convolution operation.

[`dilationRateX`](/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor/dilationRateX)

[`dilationRateY`](/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor/dilationRateY)

[`neuronParameterA()`](/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor/neuronParameterA())

[`neuronParameterB()`](/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor/neuronParameterB())

[`neuronType()`](/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor/neuronType())

[`fusedNeuronDescriptor`](/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor/fusedNeuronDescriptor)

### Instance Methods

[`encode(with:)`](/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor/encode(with:))

[`setBatchNormalizationParametersForInferenceWithMean(_:variance:gamma:beta:epsilon:)`](/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor/setBatchNormalizationParametersForInferenceWithMean(_:variance:gamma:beta:epsilon:))

[`setNeuronToPReLUWithParametersA(_:)`](/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor/setNeuronToPReLUWithParametersA(_:))

[`setNeuronType(_:parameterA:parameterB:)`](/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor/setNeuronType(_:parameterA:parameterB:))

### Type Properties

[`supportsSecureCoding`](/documentation/MetalPerformanceShaders/MPSCNNConvolutionDescriptor/supportsSecureCoding)



---

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)