---
title: MLCActivationLayer
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/mlcactivationlayer
---

# MLCActivationLayer

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

## Declaration

```swift
class MLCActivationLayer
```

## Overview

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 Preconfigured Activation Layers instead of creating a descriptor to use with an activation layer initializer.

## Topics

### Creating Activation Layers

- [init(descriptor:)](mlcompute/mlcactivationlayer/init(descriptor:).md)
- [Preconfigured Activation Layers](mlcompute/preconfigured-activation-layers.md)
- [MLCActivationDescriptor](mlcompute/mlcactivationdescriptor.md)

### Inspecting Activation Layers

- [descriptor](mlcompute/mlcactivationlayer/descriptor.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

### Activation Layers

- [MLCMultiheadAttentionLayer](mlcompute/mlcmultiheadattentionlayer.md)
- [MLCSoftmaxLayer](mlcompute/mlcsoftmaxlayer.md)
