# tf.keras.activations.mish

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/keras-team/keras/tree/v2.14.0/keras/activations.py#L474-L510) |

Mish activation function.

    tf.keras.activations.mish(
        x
    )

#### It is defined as:

    def mish(x):
        return x * tanh(softplus(x))

where `softplus` is defined as:

    def softplus(x):
        return log(exp(x) + 1)

#### Example:

    a = tf.constant([-3.0, -1.0, 0.0, 1.0], dtype = tf.float32)
    b = tf.keras.activations.mish(a)
    b.numpy()
    array([-0.14564745, -0.30340144,  0.,  0.86509836], dtype=float32)

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | Input tensor. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| The mish activation. ||

<br />

<br />

<br />

| ## Reference ||
|---|---|
| <br /> - [Mish: A Self Regularized Non-Monotonic Activation Function](https://arxiv.org/abs/1908.08681) ||

<br />