# tf.keras.metrics.categorical_accuracy

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 2 version](https://www.tensorflow.org/api_docs/python/tf/keras/metrics/categorical_accuracy) | [![](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/metrics.py#L2764-L2769) |

#### View aliases


**Compat aliases for migration**

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

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

<br />

    tf.keras.metrics.categorical_accuracy(
        y_true, y_pred
    )