<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#L9076-L9092) |

Compute the arithmetic mean along the specified axes.

#### View aliases


**Main aliases**

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

<br />

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

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | Input tensor. |
| `axis` | Axis or axes along which the means are computed. The default is to compute the mean of the flattened tensor. |
| `keepdims` | If this is set to `True`, the axes which are reduced are left in the result as dimensions with size one. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Output tensor containing the mean values. ||

<br />