CtcBeamSearchDecoder

public final class CtcBeamSearchDecoder

Performs beam search decoding on the logits given in input.

A note about the attribute merge_repeated: For the beam search decoder, this means that if consecutive entries in a beam are the same, only the first of these is emitted. That is, when the top path is "A B B B B", "A B" is returned if merge_repeated = True but "A B B B B" is returned if merge_repeated = False.

Nested Classes

class CtcBeamSearchDecoder.Options Optional attributes for CtcBeamSearchDecoder  

Constants

String OP_NAME The name of this op, as known by TensorFlow core engine

Public Methods

static <T extends TNumber> CtcBeamSearchDecoder<T>
create(Scope scope, Operand<T> inputs, Operand<TInt32> sequenceLength, Long beamWidth, Long topPaths, Options... options)
Factory method to create a class wrapping a new CtcBeamSearchDecoder operation.
List<Output<TInt64>>
decodedIndices()
A list (length: top_paths) of indices matrices.
List<Output<TInt64>>
decodedShape()
A list (length: top_paths) of shape vector.
List<Output<TInt64>>
decodedValues()
A list (length: top_paths) of values vectors.
Output<T>
logProbability()
A matrix, shaped: `(batch_size x top_paths)`.
static CtcBeamSearchDecoder.Options
mergeRepeated(Boolean mergeRepeated)

Inherited Methods

org.tensorflow.op.RawOp
final boolean
equals(Object obj)
final int
Operation
op()
Return this unit of computation as a single Operation.
final String
boolean
equals(Object arg0)
final Class<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()
org.tensorflow.op.Op
abstract ExecutionEnvironment
env()
Return the execution environment this op was created in.
abstract Operation
op()
Return this unit of computation as a single Operation.

Constants

public static final String OP_NAME

The name of this op, as known by TensorFlow core engine

Constant Value: "CTCBeamSearchDecoder"

Public Methods

public static CtcBeamSearchDecoder<T> create (Scope scope, Operand<T> inputs, Operand<TInt32> sequenceLength, Long beamWidth, Long topPaths, Options... options)

Factory method to create a class wrapping a new CtcBeamSearchDecoder operation.

Parameters
scope current scope
inputs 3-D, shape: `(max_time x batch_size x num_classes)`, the logits.
sequenceLength A vector containing sequence lengths, size `(batch)`.
beamWidth A scalar >= 0 (beam search beam width).
topPaths A scalar >= 0, <= beam_width (controls output size).
options carries optional attributes values
Returns
  • a new instance of CtcBeamSearchDecoder

public List<Output<TInt64>> decodedIndices ()

A list (length: top_paths) of indices matrices. Matrix j, size `(total_decoded_outputs[j] x 2)`, has indices of a `SparseTensor`. The rows store: [batch, time].

public List<Output<TInt64>> decodedShape ()

A list (length: top_paths) of shape vector. Vector j, size `(2)`, stores the shape of the decoded `SparseTensor[j]`. Its values are: `[batch_size, max_decoded_length[j]]`.

public List<Output<TInt64>> decodedValues ()

A list (length: top_paths) of values vectors. Vector j, size `(length total_decoded_outputs[j])`, has the values of a `SparseTensor`. The vector stores the decoded classes for beam j.

public Output<T> logProbability ()

A matrix, shaped: `(batch_size x top_paths)`. The sequence log-probabilities.

public static CtcBeamSearchDecoder.Options mergeRepeated (Boolean mergeRepeated)

Parameters
mergeRepeated If true, merge repeated classes in output.