<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/numpy.py#L4868-L4890) |

Base-2 logarithm of the sum of exponentiations of the inputs.

#### View aliases


**Main aliases**

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

<br />

    tf.keras.ops.logaddexp2(
        x1, x2
    )

Calculates `log2(2**x1 + 2**x2)`.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x1` | Input tensor. |
| `x2` | Input tensor. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Output tensor, element-wise log base 2 of the sum of 2**x1 and 2**x2. ||

<br />

#### Example:

    from keras import ops
    x1 = ops.array([1, 2, 3])
    x2 = ops.array([1, 2, 3])
    ops.logaddexp2(x1, x2)
    array([2., 3., 4.], dtype=float32)