Skip to content

Latest commit

 

History

History
81 lines (54 loc) · 2.37 KB

CtcDecodingLayer.md

File metadata and controls

81 lines (54 loc) · 2.37 KB

CCtcDecodingLayer Class

The class implements a layer that is looking for the most probable sequences in the response of a connectionist temporal classification network.

Settings

Blank label for spaces

void SetBlankLabel( int blankLabel );

Sets the value of the "blank" label that will be used as the space between other labels.

Spaces cutoff

void SetBlankProbabilityThreshold( float threshold );

Sets the probability threshold for blank labels, when building a linear division graph (LDG).

Arcs cutoff

void SetArcProbabilityThreshold( float threshold );

Sets the probability threshold for cutting off arcs when building an LDG.

Trainable parameters

The layer has no trainable parameters.

Inputs

The layer has one or two inputs:

  1. The first input accepts a blob with the network response, of the dimensions:
    • BatchLength is the maximum response sequence length
    • BatchWidth is the number of sequences in the set
    • ListSize is equal to 1
    • Height * Width * Depth * Channels is the number of classes
  2. [Optional] The second input accepts a blob with int data that contains the network response sequences' lengths. If this input is not connected, the network response sequences are considered to be the first input's BatchLength long. This input dimensions are:
    • BatchWidth equal to the first input BatchWidth
    • the other dimensions are equal to 1

Outputs

The layer has no outputs.

The most probable sequence

void GetBestSequence(int sequenceNumber, CArray<int>& bestLabelSequence) const;

Retrieves the most probable sequence for the object with the sequenceNumber index in the set.

Linear division graph

bool BuildGLD(int sequenceNumber, CLdGraph<CCtcGLDArc>& gld) const;

Retrieves the linear division graph for the object with the sequenceNumber index in the set.