<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/BNNSActivation/init(function:alpha:beta:iscale:ioffset:ishift:iscale_per_channel:ioffset_per_channel:ishift_per_channel:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:So14BNNSActivationa8function5alpha4beta6iscale7ioffset6ishift0E12_per_channel0f1_h1_I00g1_h1_I0ABSo0A8Functiona_S2fs5Int32VA2OSPyAOGSgA2Qtcfc"
  },
  "title" : "init(function:alpha:beta:iscale:ioffset:ishift:iscale_per_channel:ioffset_per_channel:ishift_per_channel:)"
}
-->

# init(function:alpha:beta:iscale:ioffset:ishift:iscale_per_channel:ioffset_per_channel:ishift_per_channel:)

Returns a new common activation function parameters structure that uses the specified function, alpha, beta, integer scale, offset, and shift.

```
init(function: BNNSActivationFunction, alpha: Float, beta: Float, iscale: Int32, ioffset: Int32, ishift: Int32, iscale_per_channel: UnsafePointer<Int32>?, ioffset_per_channel: UnsafePointer<Int32>?, ishift_per_channel: UnsafePointer<Int32>?)
```

## Parameters

`function`

The activation function.

`alpha`

The parameter for the alpha of the activation function.

`beta`

The parameter for the beta of the activation function.

`iscale`

Scale for integer functions.

`ioffset`

Offset for integer functions.

`ishift`

Shift for integer functions.

`iscale_per_channel`

Scale per channel for integer functions.

`ioffset_per_channel`

Offset per channel for integer functions.

`ishift_per_channel`

Shift per channel for integer functions.

## Return Value

A new common activation function parameters structure.

---

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)