Computes CTC (Connectionist Temporal Classification) loss.
tf.compat.v1.nn.ctc_loss_v2( labels, logits, label_length, logit_length, logits_time_major=True, unique=None, blank_index=None, name=None )
This op implements the CTC loss as presented in (Graves et al., 2006).
| ||tensor of shape [batch_size, max_label_seq_length] or SparseTensor|
| ||tensor of shape [frames, batch_size, num_labels], if logits_time_major == False, shape is [batch_size, frames, num_labels].|
| ||tensor of shape [batch_size], None if labels is SparseTensor Length of reference label sequence in labels.|
| ||tensor of shape [batch_size] Length of input sequence in logits.|
| ||(optional) If True (default), logits is shaped [time, batch, logits]. If False, shape is [batch, time, logits]|
| ||(optional) Unique label indices as computed by ctc_unique_labels(labels). If supplied, enable a faster, memory efficient implementation on TPU.|
| ||(optional) Set the class index to use for the blank label. Negative values will start from num_classes, ie, -1 will reproduce the ctc_loss behavior of using num_classes - 1 for the blank symbol. There is some memory/performance overhead to switching from the default of 0 as an additional shifted copy of the logits may be created.|
| || A name for this |
| ||tensor of shape [batch_size], negative log probabilities.|
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.