# tf.keras.backend.argmax

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 2 version](https://www.tensorflow.org/api_docs/python/tf/keras/backend/argmax) | [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/keras/backend.py#L2038-L2049) |

Returns the index of the maximum value along an axis.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.keras.backend.argmax`](https://www.tensorflow.org/api_docs/python/tf/keras/backend/argmax), \`tf.compat.v2.keras.backend.argmax\`

<br />

    tf.keras.backend.argmax(
        x, axis=-1
    )

<br />

<br />

<br />

| ## Arguments ||
|---|---|
| `x` | Tensor or variable. |
| `axis` | axis along which to perform the reduction. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A tensor. ||

<br />