---
title: "init(kernelWidth:kernelHeight:inputFeatureChannels:outputFeatureChannels:neuronFilter:)"
framework: metalperformanceshaders
role: symbol
role_heading: Initializer
path: "metalperformanceshaders/mpscnnconvolutiondescriptor/init(kernelwidth:kernelheight:inputfeaturechannels:outputfeaturechannels:neuronfilter:)"
---

# init(kernelWidth:kernelHeight:inputFeatureChannels:outputFeatureChannels:neuronFilter:)

Creates a convolution descriptor with an optional neuron filter.

## Declaration

```swift
convenience init(kernelWidth: Int, kernelHeight: Int, inputFeatureChannels: Int, outputFeatureChannels: Int, neuronFilter: MPSCNNNeuron?)
```

## Parameters

- `kernelWidth`: The width of the kernel window. This value must be >0. Larger values will take a longer time to process.
- `kernelHeight`: The height of the kernel window. The value must be >0. Larger values will take a longer time to process.
- `inputFeatureChannels`: The number of feature channels in the input image. This value must be >=1.
- `outputFeatureChannels`: The number of feature channels in the output image. This value must be >=1.
- `neuronFilter`: An optional neuron filter that can be applied to the output of the convolution operation.

## Return Value

Return Value A valid MPSCNNConvolution object or nil, if failure.

## See Also

### Type Methods

- [init(coder:)](metalperformanceshaders/mpscnnconvolutiondescriptor/init(coder:).md)
- [init(kernelWidth:kernelHeight:inputFeatureChannels:outputFeatureChannels:)](metalperformanceshaders/mpscnnconvolutiondescriptor/init(kernelwidth:kernelheight:inputfeaturechannels:outputfeaturechannels:).md)
