<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/BNNSActivationFunctionLinearWithBias",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@EA@BNNSActivationFunction@BNNSActivationFunctionLinearWithBias"
  },
  "title" : "BNNSActivationFunctionLinearWithBias"
}
-->

# BNNSActivationFunctionLinearWithBias

An activation function that returns its input multiplied by a scale and added to a bias.

```
var BNNSActivationFunctionLinearWithBias: BNNSActivationFunction { get }
```

## Discussion

This constant defines an activation function that returns values using the following operation:

```c
alpha*x + beta
```

The following illustrates the output that the activation function generates from inputs in the range `-10...10`, an `alpha` of `2.0`, and a `beta` of `10.0`:

![Graph that shows input values for the activation function on horizontal axis and its output values on vertical axis. ](images/com.apple.accelerate/media-3560495@2x.png)

---

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)