<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/losses/losses.py#L2525-L2560) |

CTC (Connectionist Temporal Classification) loss.

    tf.keras.losses.ctc(
        y_true, y_pred
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `y_true` | A tensor of shape `(batch_size, max_length)` containing the true labels in integer format. `0` always represents the blank/mask index and should not be used for classes. |
| `y_pred` | A tensor of shape `(batch_size, max_length, num_classes)` containing logits (the output of your model). They should *not* be normalized via softmax. |

<br />