---
title: MPSCNNSoftMax
framework: metalperformanceshaders
role: symbol
role_heading: Class
path: metalperformanceshaders/mpscnnsoftmax
---

# MPSCNNSoftMax

A neural transfer function that is useful for classification tasks.

## Declaration

```swift
class MPSCNNSoftMax
```

## Overview

Overview The softmax filter is applied across feature channels in a convolutional manner at all spatial locations. The softmax filter can be seen as the combination of an activation function (exponential) and a normalization operator. For each feature channel per pixel in an image in a feature map, the softmax filter computes the following:

Where R is the result channel in the pixel and N is the number of feature channels.

## 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

### Softmax Layers

- [MPSCNNLogSoftMax](metalperformanceshaders/mpscnnlogsoftmax.md)
- [MPSCNNLogSoftMaxGradient](metalperformanceshaders/mpscnnlogsoftmaxgradient.md)
- [MPSCNNSoftMaxGradient](metalperformanceshaders/mpscnnsoftmaxgradient.md)
