---
title: "init(iw_desc:hw_desc:cw_desc:b_desc:activation:)"
framework: accelerate
role: symbol
role_heading: Initializer
path: "accelerate/bnnslstmgatedescriptor/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.

## Declaration

```swift
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.

## See Also

### Initializers

- [init()](accelerate/bnnslstmgatedescriptor/init().md)
