ctc
Connectionist temporal classification (CTC) loss for unaligned sequence classification
Since R2021a
Syntax
Description
The CTC operation computes the connectionist temporal classification (CTC) loss between unaligned sequences.
The ctc
function computes the CTC loss between predictions and
targets represented as dlarray
data.
Using dlarray
objects makes working with high
dimensional data easier by allowing you to label the dimensions. For example, you can label
which dimensions correspond to spatial, time, channel, and batch dimensions using the
"S"
, "T"
, "C"
, and
"B"
labels, respectively. For unspecified and other dimensions, use the
"U"
label. For dlarray
object functions that operate
over particular dimensions, you can specify the dimension labels by formatting the
dlarray
object directly, or by using the DataFormat
option.
returns the CTC loss between the formatted loss
= ctc(Y
,targets
,YMask
,targetsMask
)dlarray
object
Y
containing the predictions and the target values
targets
using the prediction and target masks
YMask
and targetsMask
, respectively. The
function reduces the loss values by taking the mean across the batch dimension.
For unformatted input data, use the 'DataFormat'
option.
also specifies the dimension format loss
= ctc(Y
,targets
,YMask
,targetsMask
,'DataFormat',FMT)FMT
when Y
is not
a formatted dlarray
.
specifies options using one or more name-value pair arguments in addition to the input
arguments in previous syntaxes. For example, loss
= ctc(___,Name,Value
)'BlankIndex','last'
specifies a blank index corresponding to the last element of the vocabulary.
Examples
Input Arguments
Output Arguments
Algorithms
Extended Capabilities
Version History
Introduced in R2021a