---
title: MPSMatrixNeuronGradient
framework: metalperformanceshaders
role: symbol
role_heading: Class
path: metalperformanceshaders/mpsmatrixneurongradient
---

# MPSMatrixNeuronGradient

A gradient neuron activation kernel that operates on matrices.

## Declaration

```swift
class MPSMatrixNeuronGradient
```

## Topics

### Initializers

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

### Instance Properties

- [alpha](metalperformanceshaders/mpsmatrixneurongradient/alpha.md)
- [sourceInputFeatureChannels](metalperformanceshaders/mpsmatrixneurongradient/sourceinputfeaturechannels.md)
- [sourceNumberOfFeatureVectors](metalperformanceshaders/mpsmatrixneurongradient/sourcenumberoffeaturevectors.md)

### Instance Methods

- [copy(with:device:)](metalperformanceshaders/mpsmatrixneurongradient/copy(with:device:).md)
- [encode(to:gradientMatrix:inputMatrix:biasVector:resultGradientForDataMatrix:resultGradientForBiasVector:)](metalperformanceshaders/mpsmatrixneurongradient/encode(to:gradientmatrix:inputmatrix:biasvector:resultgradientfordatamatrix:resultgradientforbiasvector:).md)
- [neuronParameterA()](metalperformanceshaders/mpsmatrixneurongradient/neuronparametera().md)
- [neuronParameterB()](metalperformanceshaders/mpsmatrixneurongradient/neuronparameterb().md)
- [neuronParameterC()](metalperformanceshaders/mpsmatrixneurongradient/neuronparameterc().md)
- [neuronType()](metalperformanceshaders/mpsmatrixneurongradient/neurontype().md)
- [setNeuronToPReLUWithParametersA(_:)](metalperformanceshaders/mpsmatrixneurongradient/setneurontopreluwithparametersa(_:).md)
- [setNeuronType(_:parameterA:parameterB:parameterC:)](metalperformanceshaders/mpsmatrixneurongradient/setneurontype(_:parametera:parameterb:parameterc:).md)

## Relationships

### Inherits From

- [MPSMatrixBinaryKernel](metalperformanceshaders/mpsmatrixbinarykernel.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 Neural Network Operations

- [MPSMatrixFullyConnected](metalperformanceshaders/mpsmatrixfullyconnected.md)
- [MPSMatrixFullyConnectedGradient](metalperformanceshaders/mpsmatrixfullyconnectedgradient.md)
- [MPSMatrixNeuron](metalperformanceshaders/mpsmatrixneuron.md)
