<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/BNNSGraph/Builder/Tensor/prelu(alpha:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:10Accelerate9BNNSGraphO7BuilderV6TensorV5prelu5alphaAGy__xGSaySfG_tF"
  },
  "title" : "prelu(alpha:)"
}
-->

# prelu(alpha:)

Adds a Parametric ReLU (PReLU) activation operation to the current graph.

```
func prelu(alpha: [Float]) -> BNNSGraph.Builder.Tensor<T>
```

## Discussion

Performs the operation `prelu(self) = max(0, self) + alpha[i] * min(0, self)`, for each channel `i`.

`self` must have at least two dimensions.

The number of elements in `alpha` must be either 1 or `self.shape[1]`.

The operation applies the weight `alpha[i]` to channel `i` while performing the activation.

---

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)