---
title: "init(reductionType:dimension:)"
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/mlcreductionlayer/init(reductiontype:dimension:)"
---

# init(reductionType:dimension:)

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

## Declaration

```swift
convenience init?(reductionType: MLCReductionType, dimension: Int)
```

## Parameters

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

## Return Value

Return Value A new MLCReductionLayer instance.

## See Also

### Creating Reduction Layers

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