Permalink
Browse files

bug in beam search

  • Loading branch information...
1 parent 6efbad6 commit cd5d8bf86312e08d0eb6cb3f89f761556703e68c @ryankiros committed Nov 3, 2015
Showing with 1 addition and 1 deletion.
  1. +1 −1 search.py
View
@@ -63,7 +63,7 @@ def gen_sample(tparams, f_init, f_next, ctx, options, trng=None, k=1, maxlen=30,
for idx, [ti, wi] in enumerate(zip(trans_indices, word_indices)):
new_hyp_samples.append(hyp_samples[ti]+[wi])
- new_hyp_scores[idx] = copy.copy(costs[ti])
+ new_hyp_scores[idx] = copy.copy(costs[idx])
new_hyp_states.append(copy.copy(next_state[ti]))
# check the finished samples

0 comments on commit cd5d8bf

Please sign in to comment.