<!--
{
  "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/MLCActivationLayer",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "ML Compute"
    ],
    "preciseIdentifier" : "c:objc(cs)MLCActivationLayer"
  },
  "title" : "MLCActivationLayer"
}
-->

# MLCActivationLayer

A layer that applies an activation function to the source tensor and produces an output.

```
class MLCActivationLayer
```

## Overview

To construct an activation layer, create an activation descriptor and then pass it to the initializer.

> Tip:
> If you don’t need to customize the behavior of the activation layer, you can save time by using <doc://com.apple.mlcompute/documentation/MLCompute/preconfigured-activation-layers> instead of creating a descriptor to use with an activation layer initializer.

## Topics

### Creating Activation Layers

[`+  layerWithDescriptor:`](/documentation/MLCompute/MLCActivationLayer/init(descriptor:))

Creates an activation layer with the descriptor you specify.

[Preconfigured Activation Layers](/documentation/MLCompute/preconfigured-activation-layers)

Obtain a preconfigured activation layer with common behavior.

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

A configuration object you use to create an activation layer.

### Inspecting Activation Layers

[`descriptor`](/documentation/MLCompute/MLCActivationLayer/descriptor)

The configuration object you use to create an activation layer.

## Relationships

### Conforms To

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Hashable`](/documentation/Swift/Hashable)

### Inherits From

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

---

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)