---
title: MPSCNNCrossChannelNormalization
framework: metalperformanceshaders
role: symbol
role_heading: Class
path: metalperformanceshaders/mpscnncrosschannelnormalization
---

# MPSCNNCrossChannelNormalization

A normalization kernel applied across feature channels.

## Declaration

```swift
class MPSCNNCrossChannelNormalization
```

## Overview

Overview The normalization kernel applies the kernel to a local region across nearby feature channels, but with no spatial extent (i.e., they have the shape kernel size x 1 x 1). The normalized output is given by the function:

Where the normalizing factor is:

Where N is the kernel size. The window Q(k) itself is defined as:

Where k is the feature channel index (running from 0 to D-1) and D is the number of feature channels, and the values of alpha, beta, and delta are set via properties. It is your responsibility to ensure that the combination of the values of the delta and alpha properties does not result in a situation where the denominator becomes zero - in such situations the resulting pixel-value is undefined. note: The encoding methods in the MPSUnaryImageKernel class can be used to encode an MPSCNNCrossChannelNormalization object to a MTLCommandBuffer object.

## Topics

### Initializers

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

### Instance Properties

- [alpha](metalperformanceshaders/mpscnncrosschannelnormalization/alpha.md)
- [beta](metalperformanceshaders/mpscnncrosschannelnormalization/beta.md)
- [delta](metalperformanceshaders/mpscnncrosschannelnormalization/delta.md)
- [kernelSize](metalperformanceshaders/mpscnncrosschannelnormalization/kernelsize.md)

## Relationships

### Inherits From

- [MPSCNNKernel](metalperformanceshaders/mpscnnkernel.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Normalization Layers

- [MPSCNNCrossChannelNormalizationGradient](metalperformanceshaders/mpscnncrosschannelnormalizationgradient.md)
- [MPSCNNLocalContrastNormalization](metalperformanceshaders/mpscnnlocalcontrastnormalization.md)
- [MPSCNNLocalContrastNormalizationGradient](metalperformanceshaders/mpscnnlocalcontrastnormalizationgradient.md)
- [MPSCNNSpatialNormalization](metalperformanceshaders/mpscnnspatialnormalization.md)
- [MPSCNNSpatialNormalizationGradient](metalperformanceshaders/mpscnnspatialnormalizationgradient.md)
- [MPSCNNBatchNormalization](metalperformanceshaders/mpscnnbatchnormalization.md)
- [MPSCNNBatchNormalizationGradient](metalperformanceshaders/mpscnnbatchnormalizationgradient.md)
- [MPSCNNBatchNormalizationState](metalperformanceshaders/mpscnnbatchnormalizationstate.md)
- [MPSCNNNormalizationMeanAndVarianceState](metalperformanceshaders/mpscnnnormalizationmeanandvariancestate.md)
- [MPSCNNBatchNormalizationStatistics](metalperformanceshaders/mpscnnbatchnormalizationstatistics.md)
- [MPSCNNBatchNormalizationStatisticsGradient](metalperformanceshaders/mpscnnbatchnormalizationstatisticsgradient.md)
- [MPSCNNInstanceNormalization](metalperformanceshaders/mpscnninstancenormalization.md)
- [MPSCNNInstanceNormalizationGradient](metalperformanceshaders/mpscnninstancenormalizationgradient.md)
- [MPSCNNInstanceNormalizationGradientState](metalperformanceshaders/mpscnninstancenormalizationgradientstate.md)
- [MPSCNNNormalizationGammaAndBetaState](metalperformanceshaders/mpscnnnormalizationgammaandbetastate.md)
