@Operator public final class CTCLoss extends PrimitiveOp
the gradient. This class performs the softmax operation for you, so inputs should be e.g. linear projections of outputs by an LSTM.
| Modifier and Type | Class and Description |
|---|---|
static class |
CTCLoss.Options
Optional attributes for
CTCLoss |
operation| Modifier and Type | Method and Description |
|---|---|
static CTCLoss |
create(Scope scope,
Operand<Float> inputs,
Operand<Long> labelsIndices,
Operand<Integer> labelsValues,
Operand<Integer> sequenceLength,
CTCLoss.Options... options)
Factory method to create a class to wrap a new CTCLoss operation to the graph.
|
static CTCLoss.Options |
ctcMergeRepeated(Boolean ctcMergeRepeated) |
Output<Float> |
gradient()
The gradient of `loss`.
|
static CTCLoss.Options |
ignoreLongerOutputsThanInputs(Boolean ignoreLongerOutputsThanInputs) |
Output<Float> |
loss()
A vector (batch) containing log-probabilities.
|
static CTCLoss.Options |
preprocessCollapseRepeated(Boolean preprocessCollapseRepeated) |
equals, hashCode, toStringpublic static CTCLoss create(Scope scope, Operand<Float> inputs, Operand<Long> labelsIndices, Operand<Integer> labelsValues, Operand<Integer> sequenceLength, CTCLoss.Options... options)
scope - current graph scopeinputs - 3-D, shape: `(max_time x batch_size x num_classes)`, the logits.labelsIndices - The indices of a `SparseTensorlabelsValues - The values (labels) associated with the given batch and time.sequenceLength - A vector containing sequence lengths (batch).options - carries optional attributes valuespublic static CTCLoss.Options preprocessCollapseRepeated(Boolean preprocessCollapseRepeated)
preprocessCollapseRepeated - Scalar, if true then repeated labels are
collapsed prior to the CTC calculation.public static CTCLoss.Options ctcMergeRepeated(Boolean ctcMergeRepeated)
ctcMergeRepeated - Scalar. If set to false, during CTC calculation
repeated non-blank labels will not be merged and are interpreted as
individual labels. This is a simplified version of CTC.public static CTCLoss.Options ignoreLongerOutputsThanInputs(Boolean ignoreLongerOutputsThanInputs)
ignoreLongerOutputsThanInputs - Scalar. If set to true, during CTC
calculation, items that have longer output sequences than input sequences
are skipped: they don't contribute to the loss term and have zero-gradient.Copyright © 2015–2019. All rights reserved.