---
title: MLCReductionLayer
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/mlcreductionlayer
---

# MLCReductionLayer

A layer that reduces tensor values across a specific dimension to a scalar value.

## Declaration

```swift
class MLCReductionLayer
```

## Overview

Overview Use this layer to perform reduction operations on a given dimension. The output of this layer is a tensor of the same shape as the source tensor, except the layer sets the dimension to 1.

## Topics

### Creating Reduction Layers

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

### Inspecting Reduction Layers

- [reductionType](mlcompute/mlcreductionlayer/reductiontype.md)
- [dimension](mlcompute/mlcreductionlayer/dimension.md)
- [dimensions](mlcompute/mlcreductionlayer/dimensions-9oph6.md)

## Relationships

### Inherits From

- [MLCLayer](mlcompute/mlclayer.md)

### Conforms To

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

## See Also

### Math Layers

- [MLCArithmeticLayer](mlcompute/mlcarithmeticlayer.md)
- [MLCMatMulLayer](mlcompute/mlcmatmullayer.md)
- [MLCFullyConnectedLayer](mlcompute/mlcfullyconnectedlayer.md)
- [MLCGramMatrixLayer](mlcompute/mlcgrammatrixlayer.md)
- [MLCComparisonLayer](mlcompute/mlccomparisonlayer.md)
