<!--
{
  "availability" : [
    "iOS: 14.0.0 - 17.4.0",
    "iPadOS: 14.0.0 - 17.4.0",
    "macCatalyst: 14.0.0 - 17.4.0",
    "macOS: 11.0.0 - 14.3.0",
    "tvOS: 14.0.0 - 17.4.0"
  ],
  "documentType" : "symbol",
  "framework" : "MLCompute",
  "identifier" : "/documentation/MLCompute/MLCReductionLayer",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "ML Compute"
    ],
    "preciseIdentifier" : "c:objc(cs)MLCReductionLayer"
  },
  "title" : "MLCReductionLayer"
}
-->

# MLCReductionLayer

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

```
class MLCReductionLayer
```

## 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:)`](/documentation/MLCompute/MLCReductionLayer/init(reductionType:dimension:))

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

[`init(reductionType:dimensions:)`](/documentation/MLCompute/MLCReductionLayer/init(reductionType:dimensions:))

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

[`layerWithReductionType:dimensions:`](/documentation/MLCompute/MLCReductionLayer/layerWithReductionType:dimensions:)

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

[`MLCReductionType`](/documentation/MLCompute/MLCReductionType)

Constants that describe a reduction operation type.

### Inspecting Reduction Layers

[`reductionType`](/documentation/MLCompute/MLCReductionLayer/reductionType)

The function reduction type the system uses for reduction.

[`dimension`](/documentation/MLCompute/MLCReductionLayer/dimension)

The dimension to perform the reduction operation on.

[`dimensions`](/documentation/MLCompute/MLCReductionLayer/dimensions-9oph6)

The dimensions to perform the reduction operation on.

[`dimensions`](/documentation/MLCompute/MLCReductionLayer/dimensions-4359b)

The dimensions to perform the reduction operation on.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)