@Operator public final class CTCGreedyDecoder extends PrimitiveOp
A note about the attribute merge_repeated: if enabled, when consecutive logits' maximum indices are the same, only the first of these is emitted. Labeling the blank '*', the sequence "A B B * B B" becomes "A B B" if merge_repeated = True and "A B B B B" if merge_repeated = False.
Regardless of the value of merge_repeated, if the maximum index of a given time and batch corresponds to the blank, index `(num_classes - 1)`, no new element is emitted.
| Modifier and Type | Class and Description |
|---|---|
static class |
CTCGreedyDecoder.Options
Optional attributes for
CTCGreedyDecoder |
operation| Modifier and Type | Method and Description |
|---|---|
static CTCGreedyDecoder |
create(Scope scope,
Operand<Float> inputs,
Operand<Integer> sequenceLength,
CTCGreedyDecoder.Options... options)
Factory method to create a class to wrap a new CTCGreedyDecoder operation to the graph.
|
Output<Long> |
decodedIndices()
Indices matrix, size `(total_decoded_outputs x 2)`,
of a `SparseTensor
|
Output<Long> |
decodedShape()
Shape vector, size `(2)`, of the decoded SparseTensor.
|
Output<Long> |
decodedValues()
Values vector, size: `(total_decoded_outputs)`,
of a `SparseTensor
|
Output<Float> |
logProbability()
Matrix, size `(batch_size x 1)`, containing sequence
log-probabilities.
|
static CTCGreedyDecoder.Options |
mergeRepeated(Boolean mergeRepeated) |
equals, hashCode, toStringpublic static CTCGreedyDecoder create(Scope scope, Operand<Float> inputs, Operand<Integer> sequenceLength, CTCGreedyDecoder.Options... options)
scope - current graph scopeinputs - 3-D, shape: `(max_time x batch_size x num_classes)`, the logits.sequenceLength - A vector containing sequence lengths, size `(batch_size)`.options - carries optional attributes valuespublic static CTCGreedyDecoder.Options mergeRepeated(Boolean mergeRepeated)
mergeRepeated - If True, merge repeated classes in output.public Output<Long> decodedIndices()
public Output<Long> decodedValues()
public Output<Long> decodedShape()
Copyright © 2015–2019. All rights reserved.