<!--
{
  "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/BNNSLayerParametersPadding/init(i_desc:o_desc:padding_size:padding_mode:padding_value:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:So26BNNSLayerParametersPaddinga6i_desc02o_D012padding_size0E5_mode0E6_valueABSo21BNNSNDArrayDescriptora_AISi_Sit_Si_SitSi_SitSi_SitSi_SitSi_SitSi_SitSi_SittSo15BNNSPaddingModeas6UInt32Vtcfc"
  },
  "title" : "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.

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

> Important:
> Padding isn’t supported beyond 4D tensors.

---

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)