Commit 6550fab1 authored by tmb's avatar tmb
Browse files


parent 9b0aee58
......@@ -751,7 +751,10 @@ def forward_algorithm(match,skip=-5.0):
# from how well the symbols match the network output.
for i in range(0,len(match)):
w = roll(v,1).copy()
# extra cost for skipping initial symbols
w[0] = skip*i
# total cost is match cost of staying in same state
# plus match cost of making a transition into the next state
v = log_add(log_mul(v,match[i]),log_mul(w,match[i]))
return array(result,'f')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment