<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/math.py#L335-L359) |

Computes the logarithm of sum of exponentials of elements in a tensor.

    tf.keras.ops.logsumexp(
        x, axis=None, keepdims=False
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | Input tensor. |
| `axis` | An integer or a tuple of integers specifying the axis/axes along which to compute the sum. If `None`, the sum is computed over all elements. Defaults to `None`. |
| `keepdims` | A boolean indicating whether to keep the dimensions of the input tensor when computing the sum. Defaults to `False`. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A tensor containing the logarithm of the sum of exponentials of elements in `x`. ||

<br />

#### Example:

    x = keras.ops.convert_to_tensor([1., 2., 3.])
    logsumexp(x)
    3.407606