tf.nn.ctc_beam_search_decoder
Stay organized with collections
Save and categorize content based on your preferences.
Performs beam search decoding on the logits given in input.
tf.nn.ctc_beam_search_decoder(
inputs, sequence_length, beam_width=100, top_paths=1
)
ctc_beam_search_decoder
treats blanks as sequence termination
ctc_greedy_decoder
treats blanks as regular elements
Args |
inputs
|
3-D float Tensor , size [max_time, batch_size, num_classes] .
The logits.
|
sequence_length
|
1-D int32 vector containing sequence lengths, having size
[batch_size] .
|
beam_width
|
An int scalar >= 0 (beam search beam width).
|
top_paths
|
An int scalar >= 0, <= beam_width (controls output size).
|
Returns |
A tuple (decoded, log_probabilities) where
|
decoded
|
A list of length top_paths, where decoded[j]
is a SparseTensor containing the decoded outputs:
decoded[j].indices : Indices matrix [total_decoded_outputs[j], 2] ;
The rows store: [batch, time] .
decoded[j].values : Values vector, size [total_decoded_outputs[j]] .
The vector stores the decoded classes for beam j .
decoded[j].dense_shape : Shape vector, size (2) .
The shape values are: [batch_size, max_decoded_length[j]] .
|
log_probability
|
A float matrix [batch_size, top_paths] containing
sequence log-probabilities.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2023-03-23 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2023-03-23 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-03-23 UTC."],[],[]]