<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/keras-team/keras/tree/v3.15.1/keras/src/ops/nn.py#L391-L417) |

Logarithm of the sigmoid activation function.

#### View aliases


**Main aliases**

[`tf.keras.ops.nn.log_sigmoid`](https://www.tensorflow.org/api_docs/python/tf/keras/ops/log_sigmoid)

<br />

    tf.keras.ops.log_sigmoid(
        x
    )

It is defined as `f(x) = log(1 / (1 + exp(-x)))`.

<br />

<br />

<br />

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

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A tensor with the same shape as `x`. ||

<br />

#### Example:

    x = keras.ops.convert_to_tensor([-0.541391, 0.0, 0.50, 5.0])
    keras.ops.log_sigmoid(x)
    array([-1.0000418, -0.6931472, -0.474077, -0.00671535], dtype=float32)