<!--
{
  "availability" : [
    "iOS: 10.0.0 - 14.0.0",
    "iPadOS: 10.0.0 - 14.0.0",
    "macCatalyst: 13.1.0 - 14.0.0",
    "macOS: 10.12.0 - 11.0.0",
    "tvOS: 10.0.0 - 14.0.0",
    "visionOS: 1.0.0 - 1.0.0",
    "watchOS: 3.0.0 - 7.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/BNNSConvolutionLayerParameters/init(x_stride:y_stride:x_padding:y_padding:k_width:k_height:in_channels:out_channels:weights:bias:activation:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:So30BNNSConvolutionLayerParametersa8x_stride02y_D09x_padding02y_E07k_width8k_height11in_channels04out_I07weights4bias10activationABSi_S7iSo13BNNSLayerDataaAOSo14BNNSActivationatcfc"
  },
  "title" : "init(x_stride:y_stride:x_padding:y_padding:k_width:k_height:in_channels:out_channels:weights:bias:activation:)"
}
-->

# init(x_stride:y_stride:x_padding:y_padding:k_width:k_height:in_channels:out_channels:weights:bias:activation:)

Returns a new convolution parameters structure.

```
init(x_stride: Int, y_stride: Int, x_padding: Int, y_padding: Int, k_width: Int, k_height: Int, in_channels: Int, out_channels: Int, weights: BNNSLayerData, bias: BNNSLayerData, activation: BNNSActivation)
```

## Parameters

`x_stride`

The X increment in the input image.

`y_stride`

The Y increment in the input image.

`x_padding`

The X padding.

`y_padding`

The Y padding.

`k_width`

The width of the convolution kernel.

`k_height`

The height of the convolution kernel.

`in_channels`

The number of input channels.

`out_channels`

The number of output channels.

`weights`

Convolution weights.

`bias`

Layer bias, one for each output channel.

`activation`

The layer activation function

## 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)