T
- data type for logProbability()
output@Operator(group="nn") public final class CtcGreedyDecoder<T extends Number> 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 <T extends Number> |
create(Scope scope,
Operand<T> inputs,
Operand<Integer> sequenceLength,
CtcGreedyDecoder.Options... options)
Factory method to create a class wrapping a new CtcGreedyDecoder operation.
|
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<T> |
logProbability()
Matrix, size `(batch_size x 1)`, containing sequence
log-probabilities.
|
static CtcGreedyDecoder.Options |
mergeRepeated(Boolean mergeRepeated) |
equals, hashCode, op, toString
public static <T extends Number> CtcGreedyDecoder<T> create(Scope scope, Operand<T> inputs, Operand<Integer> sequenceLength, CtcGreedyDecoder.Options... options)
scope
- current 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 © 2022. All rights reserved.