---
title: MPSMatrixSoftMax
framework: metalperformanceshaders
role: symbol
role_heading: Class
path: metalperformanceshaders/mpsmatrixsoftmax
---

# MPSMatrixSoftMax

A softmax kernel that operates on matrices.

## Declaration

```swift
class MPSMatrixSoftMax
```

## Topics

### Initializers

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

### Instance Properties

- [sourceColumns](metalperformanceshaders/mpsmatrixsoftmax/sourcecolumns.md)
- [sourceRows](metalperformanceshaders/mpsmatrixsoftmax/sourcerows.md)

### Instance Methods

- [copy(with:device:)](metalperformanceshaders/mpsmatrixsoftmax/copy(with:device:).md)
- [encode(commandBuffer:inputMatrix:resultMatrix:)](metalperformanceshaders/mpsmatrixsoftmax/encode(commandbuffer:inputmatrix:resultmatrix:).md)

## Relationships

### Inherits From

- [MPSMatrixUnaryKernel](metalperformanceshaders/mpsmatrixunarykernel.md)

### Inherited By

- [MPSMatrixLogSoftMax](metalperformanceshaders/mpsmatrixlogsoftmax.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

### Matrix Softmax Operations

- [MPSMatrixLogSoftMax](metalperformanceshaders/mpsmatrixlogsoftmax.md)
- [MPSMatrixLogSoftMaxGradient](metalperformanceshaders/mpsmatrixlogsoftmaxgradient.md)
- [MPSMatrixSoftMaxGradient](metalperformanceshaders/mpsmatrixsoftmaxgradient.md)
