---
title: "init(reductionType:dimensions:)"
framework: ML Compute
role: symbol
role_heading: Initializer
platforms: [iOS 14.5+, iPadOS 14.5+, Mac Catalyst 14.5+, macOS 11.3+, tvOS 14.5+]
path: "mlcompute/mlcreductionlayer/init(reductiontype:dimensions:)"
---

# init(reductionType:dimensions:)

Creates a reduction layer using the reduction type and dimensions you specify.

## Declaration

```swift
convenience init?(reductionType: MLCReductionType, dimensions: [Int])
```

## Parameters

- `reductionType`: The reduction type.
- `dimensions`: The dimensions to perform the reduction operation on.

## See Also

### Creating Reduction Layers

- [init(reductionType:dimension:)](mlcompute/mlcreductionlayer/init(reductiontype:dimension:).md)
- [MLCReductionType](mlcompute/mlcreductiontype.md)
