---
title: "init(x_stride:y_stride:x_padding:y_padding:k_width:k_height:in_channels:out_channels:weights:bias:activation:)"
framework: accelerate
role: symbol
role_heading: Initializer
path: "accelerate/bnnsconvolutionlayerparameters/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.

## Declaration

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

## See Also

### Initializers

- [init()](accelerate/bnnsconvolutionlayerparameters/init().md)
- [init(x_stride:y_stride:x_padding:y_padding:k_width:k_height:in_channels:out_channels:weights:)](accelerate/bnnsconvolutionlayerparameters/init(x_stride:y_stride:x_padding:y_padding:k_width:k_height:in_channels:out_channels:weights:).md)
