<!--
{
  "availability" : [
    "iOS: 14.0.0 - 18.0.0",
    "iPadOS: 14.0.0 - 18.0.0",
    "macCatalyst: 14.0.0 - 18.0.0",
    "macOS: 11.0.0 - 15.0.0",
    "tvOS: 14.0.0 - 18.0.0",
    "visionOS: 1.0.0 - 2.0.0",
    "watchOS: 7.0.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/BNNSLSTMGateDescriptor/init(iw_desc:hw_desc:cw_desc:b_desc:activation:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:So22BNNSLSTMGateDescriptora7iw_desc03hw_D003cw_D002b_D010activationABSo011BNNSNDArrayB0a_AIt_A3ISo14BNNSActivationatcfc"
  },
  "title" : "init(iw_desc:hw_desc:cw_desc:b_desc:activation:)"
}
-->

# init(iw_desc:hw_desc:cw_desc:b_desc:activation:)

Returns a new long short-term memory (LSTM) gate descriptor structure from the specified parameters.

```
init(iw_desc: (BNNSNDArrayDescriptor, BNNSNDArrayDescriptor), hw_desc: BNNSNDArrayDescriptor, cw_desc: BNNSNDArrayDescriptor, b_desc: BNNSNDArrayDescriptor, activation: BNNSActivation)
```

## Parameters

`iw_desc`

The descriptor of the input weights.

`hw_desc`

The descriptor of the hidden weights.

`cw_desc`

The descriptor of the cell weights.

`b_desc`

The descriptor of the bias.

`activation`

The activation function that the layer applies to the output.

---

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)