<!--
{
  "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/BNNSLayerParametersActivation/init(i_desc:o_desc:activation:axis_flags:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:So29BNNSLayerParametersActivationa6i_desc02o_D010activation10axis_flagsABSo21BNNSNDArrayDescriptora_AHSo14BNNSActivationas6UInt32Vtcfc"
  },
  "title" : "init(i_desc:o_desc:activation:axis_flags:)"
}
-->

# init(i_desc:o_desc:activation:axis_flags:)

Returns a new activation layer parameters structure from the supplied descriptors, activation function, and axis flags.

```
init(i_desc: BNNSNDArrayDescriptor, o_desc: BNNSNDArrayDescriptor, activation: BNNSActivation, axis_flags: UInt32)
```

## Parameters

`i_desc`

The descriptor of the input.

`o_desc`

The descriptor of the output.

`activation`

The activation function that the layer applies to the output.

`axis_flags`

Flags that indicate axes on which the layer applies certain activation functions.

## Discussion

> Important:
> The input dimensions must be equal to the output dimensions. For activation types other than identity, the input and output must be `float`.

---

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)