---
title: MLCLossDescriptor
framework: ML Compute
role: symbol
role_heading: Class
platforms: [iOS 14.0+, iPadOS 14.0+, Mac Catalyst 14.0+, macOS 11.0+, tvOS 14.0+]
path: mlcompute/mlclossdescriptor
---

# MLCLossDescriptor

A configuration object you use to create a loss layer.

## Declaration

```swift
class MLCLossDescriptor
```

## Topics

### Creating Loss Descriptors

- [init(type:reductionType:)](mlcompute/mlclossdescriptor/init(type:reductiontype:).md)
- [init(type:reductionType:weight:)](mlcompute/mlclossdescriptor/init(type:reductiontype:weight:).md)
- [init(type:reductionType:weight:labelSmoothing:classCount:)](mlcompute/mlclossdescriptor/init(type:reductiontype:weight:labelsmoothing:classcount:).md)
- [init(type:reductionType:weight:labelSmoothing:classCount:epsilon:delta:)](mlcompute/mlclossdescriptor/init(type:reductiontype:weight:labelsmoothing:classcount:epsilon:delta:).md)

### Inspecting Loss Descriptors

- [lossType](mlcompute/mlclossdescriptor/losstype.md)
- [reductionType](mlcompute/mlclossdescriptor/reductiontype.md)
- [weight](mlcompute/mlclossdescriptor/weight.md)
- [labelSmoothing](mlcompute/mlclossdescriptor/labelsmoothing.md)
- [classCount](mlcompute/mlclossdescriptor/classcount.md)
- [epsilon](mlcompute/mlclossdescriptor/epsilon.md)
- [delta](mlcompute/mlclossdescriptor/delta.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Creating Loss Layers with Descriptors

- [init(descriptor:)](mlcompute/mlclosslayer/init(descriptor:).md)
- [init(descriptor:weights:)](mlcompute/mlclosslayer/init(descriptor:weights:).md)
- [MLCLossType](mlcompute/mlclosstype.md)
