---
title: MLCLSTMLayer
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/mlclstmlayer
---

# MLCLSTMLayer

A layer that represents long short-term memory (LSTM) networks.

## Declaration

```swift
class MLCLSTMLayer
```

## Overview

Overview Use this class to create an LSTM layer with one of the following configurations:

## Topics

### Creating LSTM Layers

- [init(descriptor:inputWeights:hiddenWeights:biases:)](mlcompute/mlclstmlayer/init(descriptor:inputweights:hiddenweights:biases:).md)
- [init(descriptor:inputWeights:hiddenWeights:peepholeWeights:biases:)](mlcompute/mlclstmlayer/init(descriptor:inputweights:hiddenweights:peepholeweights:biases:).md)
- [init(descriptor:inputWeights:hiddenWeights:peepholeWeights:biases:gateActivations:outputResultActivation:)](mlcompute/mlclstmlayer/init(descriptor:inputweights:hiddenweights:peepholeweights:biases:gateactivations:outputresultactivation:).md)
- [MLCLSTMDescriptor](mlcompute/mlclstmdescriptor.md)
- [MLCLSTMResultMode](mlcompute/mlclstmresultmode.md)

### Inspecting LSTM Layers

- [descriptor](mlcompute/mlclstmlayer/descriptor.md)
- [gateActivations](mlcompute/mlclstmlayer/gateactivations.md)
- [outputResultActivation](mlcompute/mlclstmlayer/outputresultactivation.md)
- [inputWeights](mlcompute/mlclstmlayer/inputweights.md)
- [hiddenWeights](mlcompute/mlclstmlayer/hiddenweights.md)
- [peepholeWeights](mlcompute/mlclstmlayer/peepholeweights.md)
- [biases](mlcompute/mlclstmlayer/biases.md)
- [inputWeightsParameters](mlcompute/mlclstmlayer/inputweightsparameters.md)
- [hiddenWeightsParameters](mlcompute/mlclstmlayer/hiddenweightsparameters.md)
- [peepholeWeightsParameters](mlcompute/mlclstmlayer/peepholeweightsparameters.md)
- [biasesParameters](mlcompute/mlclstmlayer/biasesparameters.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

### Convolution and Recurrent Layers

- [MLCConvolutionLayer](mlcompute/mlcconvolutionlayer.md)
- [MLCPoolingLayer](mlcompute/mlcpoolinglayer.md)
- [MLCUpsampleLayer](mlcompute/mlcupsamplelayer.md)
- [MLCEmbeddingLayer](mlcompute/mlcembeddinglayer.md)
