<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#L5139-L5158) |

Return the maximum of a tensor or maximum along an axis.

#### View aliases


**Main aliases**

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

<br />

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

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | Input tensor. |
| `axis` | Axis or axes along which to operate. By default, flattened input is used. |
| `keepdims` | If this is set to `True`, the axes which are reduced are left in the result as dimensions with size one. Defaults to `False`. |
| `initial` | The minimum value of an output element. Defaults to `None`. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Maximum of `x`. ||

<br />