<!--
{
  "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/MLCLSTMLayer/init(descriptor:inputWeights:hiddenWeights:biases:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "ML Compute"
    ],
    "preciseIdentifier" : "c:objc(cs)MLCLSTMLayer(cm)layerWithDescriptor:inputWeights:hiddenWeights:biases:"
  },
  "title" : "init(descriptor:inputWeights:hiddenWeights:biases:)"
}
-->

# init(descriptor:inputWeights:hiddenWeights:biases:)

Creates an LSTM layer with the descriptor, input and hidden weights, and biases you specify.

```
convenience init?(descriptor: MLCLSTMDescriptor, inputWeights: [MLCTensor], hiddenWeights: [MLCTensor], biases: [MLCTensor]?)
```

## Parameters

`descriptor`

An object you use to configure the LSTM layer.

`inputWeights`

An array that contains tensors that describe the input weights.

`hiddenWeights`

An array that contains tensors that describe the hidden weights.

`biases`

An array that contains tensors that describe the bias terms.

## Discussion

---

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)