---
title: "ClikaRT::nn::Softplus"
sidebar_label: "Softplus"
description: "Smooth ReLU: log(1 + exp(beta * input)) / beta, switching to the exact linear input where beta * input exceeds threshold."
---

<!-- 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)

Smooth [ReLU](./ReLU.md): log(1 + exp(beta \* input)) / beta, switching to the exact linear input where beta \* input exceeds threshold. The module form of [`ClikaRT::ops::softplus`](../ops/softplus.md#softplus), which documents the full contract (shapes, dtypes, errors); construct once, then call it like a function.

## Member functions

### Softplus(SoftplusOptions) {#Softplus}

<div class="api-signature">

`explicit` **`Softplus`**([`SoftplusOptions`](./SoftplusOptions.md) `options` `=` `{}`)

</div>

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

<div class="api-declared">

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

</div>

### Softplus(double, double) {#Softplus-2}

<div class="api-signature">

`explicit` **`Softplus`**(`double` `beta`, `double` `threshold` `=` `20.0`)

</div>

`Softplus(beta, threshold)`: the positional form of `SoftplusOptions(beta, threshold)`.

<div class="api-declared">

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

</div>

### forward() {#forward}

<div class="api-signature">

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

</div>

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

<div class="api-declared">

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

</div>

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

<div class="api-signature">

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

</div>

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

<div class="api-declared">

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

</div>

### options() {#options}

<div class="api-signature">

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

</div>

The settings this module was constructed with.

<div class="api-declared">

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

</div>
