The loss for a batch is defined as sum (log (p (z| x)) over all samples (x, z) in this batch, according to Graves work (1. With a batch size of 1, you will admit log (p (z| x), which is the log- probability of seeing the labelling z given the inputx.| With a batch size of 1, you will admit log (p (z| x), which is the log- probability of seeing the labelling z given the inputx. TensorFlow's ctc loss function can be used to negotiate this.
You can alternately use the Forward-Backward Algorithm described in Section4.1 of the paper (1) to apply the essential bits yourself. It's possible to employ a introductory perpetration for bitsy input sequences by generating the paths indicated in Figure 3 and also casting over all of those paths in the RNN affair. I fulfilled this for a 16- character sequence and a 100- character sequence. The naive fashion was sufficient for the first, but the handed dynamic programming approach was needed for the alternate.
(1) Connectionist Temporal Bracket Using Intermittent Neural Networks to Marker Unsegmented Sequence Data