<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/legacy/backend.py#L1053-L1056) |

DEPRECATED.

    tf.keras.backend.one_hot(
        indices, num_classes
    )