---
title: MPSMatrixFullyConnectedGradient
framework: metalperformanceshaders
role: symbol
role_heading: Class
path: metalperformanceshaders/mpsmatrixfullyconnectedgradient
---

# MPSMatrixFullyConnectedGradient

A kernel for applying a fully gradient connected neural network layer.

## Declaration

```swift
class MPSMatrixFullyConnectedGradient
```

## Topics

### Initializers

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

### Instance Properties

- [alpha](metalperformanceshaders/mpsmatrixfullyconnectedgradient/alpha.md)
- [sourceInputFeatureChannels](metalperformanceshaders/mpsmatrixfullyconnectedgradient/sourceinputfeaturechannels.md)
- [sourceNumberOfFeatureVectors](metalperformanceshaders/mpsmatrixfullyconnectedgradient/sourcenumberoffeaturevectors.md)
- [sourceOutputFeatureChannels](metalperformanceshaders/mpsmatrixfullyconnectedgradient/sourceoutputfeaturechannels.md)

### Instance Methods

- [copy(with:device:)](metalperformanceshaders/mpsmatrixfullyconnectedgradient/copy(with:device:).md)
- [encodeForData(to:gradientMatrix:weightMatrix:resultGradientForDataMatrix:)](metalperformanceshaders/mpsmatrixfullyconnectedgradient/encodefordata(to:gradientmatrix:weightmatrix:resultgradientfordatamatrix:).md)
- [encodeForWeightsAndBias(to:gradientMatrix:inputMatrix:resultGradientForWeightMatrix:resultGradientForBiasVector:)](metalperformanceshaders/mpsmatrixfullyconnectedgradient/encodeforweightsandbias(to:gradientmatrix:inputmatrix:resultgradientforweightmatrix:resultgradientforbiasvector:).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)
- [MPSMatrixNeuron](metalperformanceshaders/mpsmatrixneuron.md)
- [MPSMatrixNeuronGradient](metalperformanceshaders/mpsmatrixneurongradient.md)
