<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.21.0/tensorflow/python/ops/math_ops.py#L662-L685) |

Computes elementwise softplus: `softplus(x) = log(exp(x) + 1)`.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.nn.softplus`](https://www.tensorflow.org/api_docs/python/tf/compat/v1/math/softplus)

<br />

    tf.compat.v1.math.softplus(
        features, name=None
    )

### Used in the notebooks

| Used in the tutorials |
|---|
| - [Fitting Dirichlet Process Mixture Model Using Preconditioned Stochastic Gradient Langevin Dynamics](https://www.tensorflow.org/probability/examples/Fitting_DPMM_Using_pSGLD) |

`softplus` is a smooth approximation of `relu`. Like `relu`, `softplus` always
takes on positive values.

![](https://www.tensorflow.org/images/softplus.png)

#### Example:

    import tensorflow as tf
    tf.math.softplus(tf.range(0, 2, dtype=tf.float32)).numpy()
    array([0.6931472, 1.3132616], dtype=float32)

<br />

<br />

<br />

| ## Args ||
|---|---|
| `features` | `Tensor` |
| `name` | Optional: name to associate with this operation. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| `Tensor` ||

<br />