---
title: "init(i_desc:o_desc:padding_size:padding_mode:padding_value:)"
framework: accelerate
role: symbol
role_heading: Initializer
path: "accelerate/bnnslayerparameterspadding/init(i_desc:o_desc:padding_size:padding_mode:padding_value:)"
---

# init(i_desc:o_desc:padding_size:padding_mode:padding_value:)

Returns a new padding-layer parameters structure from the specified parameters.

## Declaration

```swift
init(i_desc: BNNSNDArrayDescriptor, o_desc: BNNSNDArrayDescriptor, padding_size: ((Int, Int), (Int, Int), (Int, Int), (Int, Int), (Int, Int), (Int, Int), (Int, Int), (Int, Int)), padding_mode: BNNSPaddingMode, padding_value: UInt32)
```

## Parameters

- `i_desc`: The descriptor of the input.
- `o_desc`: The descriptor of the output.
- `padding_size`: The number of padding elements to add before and after the original data.
- `padding_mode`: The mode the operation uses to pad.
- `padding_value`: The value the operation uses to fill the padding area when the mode is constant.

## Discussion

Discussion important: Padding isn’t supported beyond 4D tensors.

## See Also

### Initializers

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