Skip to content

Commit

Permalink
bug in beam search
Browse files Browse the repository at this point in the history
  • Loading branch information
ryankiros committed Nov 3, 2015
1 parent 6efbad6 commit cd5d8bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cd5d8bf

Please sign in to comment.