---
title: MPSNNForwardLoss
framework: metalperformanceshaders
role: symbol
role_heading: Class
path: metalperformanceshaders/mpsnnforwardloss
---

# MPSNNForwardLoss

## Declaration

```swift
class MPSNNForwardLoss
```

## Topics

### Initializers

- [init(coder:device:)](metalperformanceshaders/mpsnnforwardloss/init(coder:device:).md)
- [init(device:lossDescriptor:)](metalperformanceshaders/mpsnnforwardloss/init(device:lossdescriptor:).md)

### Instance Properties

- [delta](metalperformanceshaders/mpsnnforwardloss/delta.md)
- [epsilon](metalperformanceshaders/mpsnnforwardloss/epsilon.md)
- [labelSmoothing](metalperformanceshaders/mpsnnforwardloss/labelsmoothing.md)
- [lossType](metalperformanceshaders/mpsnnforwardloss/losstype.md)
- [numberOfClasses](metalperformanceshaders/mpsnnforwardloss/numberofclasses.md)
- [reduceAcrossBatch](metalperformanceshaders/mpsnnforwardloss/reduceacrossbatch.md)
- [reductionType](metalperformanceshaders/mpsnnforwardloss/reductiontype.md)
- [weight](metalperformanceshaders/mpsnnforwardloss/weight.md)

### Instance Methods

- [encodeBatch(commandBuffer:sourceImages:labels:weights:destinationStates:destinationImages:)](metalperformanceshaders/mpsnnforwardloss/encodebatch(commandbuffer:sourceimages:labels:weights:destinationstates:destinationimages:).md)
- [encodeBatch(commandBuffer:sourceImages:labels:weights:outStates:isTemporary:)](metalperformanceshaders/mpsnnforwardloss/encodebatch(commandbuffer:sourceimages:labels:weights:outstates:istemporary:).md)

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