---
title: MPSMatrixSoftMaxGradient
framework: metalperformanceshaders
role: symbol
role_heading: Class
path: metalperformanceshaders/mpsmatrixsoftmaxgradient
---

# MPSMatrixSoftMaxGradient

A gradient softmax kernel that operates on matrices.

## Declaration

```swift
class MPSMatrixSoftMaxGradient
```

## Topics

### Initializers

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

### Instance Properties

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

### Instance Methods

- [copy(with:device:)](metalperformanceshaders/mpsmatrixsoftmaxgradient/copy(with:device:).md)
- [encode(to:gradientMatrix:forwardOutputMatrix:resultMatrix:)](metalperformanceshaders/mpsmatrixsoftmaxgradient/encode(to:gradientmatrix:forwardoutputmatrix:resultmatrix:).md)

## Relationships

### Inherits From

- [MPSMatrixBinaryKernel](metalperformanceshaders/mpsmatrixbinarykernel.md)

### Inherited By

- [MPSMatrixLogSoftMaxGradient](metalperformanceshaders/mpsmatrixlogsoftmaxgradient.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)
- [MPSMatrixSoftMax](metalperformanceshaders/mpsmatrixsoftmax.md)
