Skip to content

Commit 062dc77

Browse files
author
tmb
committed
comments
1 parent 6550fab commit 062dc77

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ocrolib/lstm.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -801,8 +801,9 @@ def ctc_align_targets(outputs,targets,threshold=100.0,verbose=0,debug=0,lo=1e-5)
801801
epath /= where(l==0.0,1e-9,l)
802802

803803
# The previous computation gives us an alignment between input time
804-
# and output sequence position; however, we actually want the posterior
805-
# probability distribution at each time step. This dot product gives
804+
# and output sequence position as posteriors over states.
805+
# However, we actually want the posterior probability distribution over
806+
# output classes at each time step. This dot product gives
806807
# us that result. We renormalize again afterwards.
807808
aligned = maximum(lo,dot(epath,targets))
808809
l = sum(aligned,axis=1)[:,newaxis]

0 commit comments

Comments
 (0)