Why won't my model train with CTC loss?
The problem was the dimensions of the logit_length argument to tf.nn.ctc_loss was incorrect.
It was this:
tf.repeat(tf.shape(y_pred)[-1], tf.shape(y_pred)[0])

But it should have been
tf.repeat(tf.shape(y_pred)[-2], tf.shape(y_pred)[0])