---
title: "Softplus"
sidebar_label: "Softplus"
description: "The clika_runtime.nn Softplus class."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

Softplus(beta=1.0, threshold=20.0)

    Smooth ReLU: log(1 + exp(beta * input)) / beta, switching to the exact
    linear input where beta * input exceeds threshold.

    The module form of ``clika_runtime.nn.functional.softplus``: construct it
    once with the settings, then call it like a function.

    Args:
        beta: the sharpness; larger approaches ReLU.
        threshold: the switch point on beta * input above which the exact
            linear input is returned.
    

## `__init__`

```python
__init__(self, beta: 'float' = 1.0, threshold: 'float' = 20.0) -> 'None'
```

Initialize self.  See help(type(self)) for accurate signature.

## `extra_repr`

```python
extra_repr(self) -> 'str'
```

extra_repr() -> str

One line of per-class detail for :meth:`__repr__`; a layer prints
its geometry here (``in_features=64, out_features=256``).

## `forward`

```python
forward(self, input: 'Tensor') -> 'Tensor'
```

forward(input) -> Tensor

Runs ``clika_runtime.nn.functional.softplus`` on ``input`` with the
stored settings; returns a new tensor.
