Skip to content
DeepForgeby svx
All problems
MediumNLPnlp-202

CTC Blank Probability

Problem

Return the probability of an all-blank CTC path: the product of the per-frame blank probabilities.

An empty list gives 1.0, the empty product.

Hint

Per-frame probabilities multiply because frames are conditionally independent.

Test cases

case 1
in: [[0.9,0.8]]
expected: 0.7200000000000001
case 2
in: [[]]
expected: 1
case 3
in: [[1,1]]
expected: 1
case 4
in: [[0.5,0.5,0.5]]
expected: 0.125
Starter codePython
def ctc_blank_probability(blank_probs):
    # Your code here
    pass

4 test cases · run your code against them in the editor