---
title: "init(type:reductionType:)"
framework: ML Compute
role: symbol
role_heading: Initializer
platforms: [iOS 14.0+, iPadOS 14.0+, Mac Catalyst 14.0+, macOS 11.0+, tvOS 14.0+]
path: "mlcompute/mlclossdescriptor/init(type:reductiontype:)"
---

# init(type:reductionType:)

Creates a loss descriptor with the loss function and reduction type you specify.

## Declaration

```swift
convenience init(type lossType: MLCLossType, reductionType: MLCReductionType)
```

## Parameters

- `lossType`: The loss function type.
- `reductionType`: The reduction operation type.

## See Also

### Creating Loss Descriptors

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