From 062dc778b0b7bf3ee442dfaec3fc75c1827fc1a6 Mon Sep 17 00:00:00 2001 From: tmb Date: Thu, 5 Sep 2013 10:47:18 -0700 Subject: [PATCH] comments --- ocrolib/lstm.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ocrolib/lstm.py b/ocrolib/lstm.py index 43674a15..6cab3e23 100644 --- a/ocrolib/lstm.py +++ b/ocrolib/lstm.py @@ -801,8 +801,9 @@ def ctc_align_targets(outputs,targets,threshold=100.0,verbose=0,debug=0,lo=1e-5) epath /= where(l==0.0,1e-9,l) # The previous computation gives us an alignment between input time - # and output sequence position; however, we actually want the posterior - # probability distribution at each time step. This dot product gives + # and output sequence position as posteriors over states. + # However, we actually want the posterior probability distribution over + # output classes at each time step. This dot product gives # us that result. We renormalize again afterwards. aligned = maximum(lo,dot(epath,targets)) l = sum(aligned,axis=1)[:,newaxis]