---
title: "init(device:kernelSize:)"
framework: metalperformanceshaders
role: symbol
role_heading: Initializer
path: "metalperformanceshaders/mpscnncrosschannelnormalization/init(device:kernelsize:)"
---

# init(device:kernelSize:)

Initializes a normalization kernel in a channel.

## Declaration

```swift
init(device: any MTLDevice, kernelSize: Int)
```

## Parameters

- `device`: The device the filter will run on.
- `kernelSize`: The size of the kernel, in both x and y dimensions.

## Return Value

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

## See Also

### Initializers

- [init(coder:device:)](metalperformanceshaders/mpscnncrosschannelnormalization/init(coder:device:).md)
