---
title: "ClikaRT::nn::LeakyReLU"
sidebar_label: "LeakyReLU"
description: "ReLU with a small slope on the negative side: input for input > 0, negative_slope * input otherwise."
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--class">class</span>

**Header:** `ClikaRT/nn/generated/activation.h`  
**Inherits:** [`ClikaRT::nn::Module`](./Module.md)

[ReLU](./ReLU.md) with a small slope on the negative side: input for input \> 0, negative\_slope \* input otherwise. The module form of [`ClikaRT::ops::leaky_relu`](../ops/leaky_relu.md#leaky_relu), which documents the full contract (shapes, dtypes, errors); construct once, then call it like a function.

## Member functions

### LeakyReLU() {#LeakyReLU}

<div class="api-signature">

`explicit` **`LeakyReLU`**([`LeakyReLUOptions`](./LeakyReLUOptions.md) `options` `=` `{}`)

</div>

Constructs the module from [`options`](./LeakyReLU.md#options) (every default when omitted).

<div class="api-declared">

Declared in `ClikaRT/nn/generated/activation.h`, line 170

</div>

### forward() {#forward}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`forward`**([`Tensor`](../Tensor.md) `input`) `const`

</div>

[`forward_impl`](./LeakyReLU.md#forward), unwrapped: raises [`ClikaRT::Error`](../Error.md) on failure.

<div class="api-declared">

Declared in `ClikaRT/nn/generated/activation.h`, line 187

</div>

### operator()() {#operator-call}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`operator()`**([`Tensor`](../Tensor.md) `input`) `const`

</div>

Same as [`forward`](./LeakyReLU.md#forward).

<div class="api-declared">

Declared in `ClikaRT/nn/generated/activation.h`, line 191

</div>

### options() {#options}

<div class="api-signature">

`const` [`LeakyReLUOptions`](./LeakyReLUOptions.md)`&` **`options`**() `const`

</div>

The settings this module was constructed with.

<div class="api-declared">

Declared in `ClikaRT/nn/generated/activation.h`, line 195

</div>
