---
title: "init(input:output:weights:bias:activation:filterParameters:)"
framework: accelerate
role: symbol
role_heading: Initializer
path: "accelerate/bnns/fullyconnectedlayer/init(input:output:weights:bias:activation:filterparameters:)"
---

# init(input:output:weights:bias:activation:filterParameters:)

Returns a new fully connected layer.

## Declaration

```swift
convenience init?(input: BNNSNDArrayDescriptor, output: BNNSNDArrayDescriptor, weights: BNNSNDArrayDescriptor, bias: BNNSNDArrayDescriptor?, activation: BNNS.ActivationFunction, filterParameters: BNNSFilterParameters? = nil)
```

## Parameters

- `input`: The descriptor of the input.
- `output`: The descriptor of the output.
- `weights`: The descriptor of the weights.
- `bias`: The descriptor of the bias.
- `activation`: The activation function that the layer applies to the output.
- `filterParameters`: The filter runtime parameters.

## Discussion

Discussion important: The input data type and the weights data type must be equal and be float, float16, int8, or int16 for the forward pass. The output data type must be float for the forward pass. All three arrays must be float for the backward pass.
