Skip to content

Commit

Permalink
Update lstm_crf.py (apache#14865)
Browse files Browse the repository at this point in the history
Fix the typo.
  • Loading branch information
doggeral authored and Rohit Kumar Srivastava committed May 14, 2019
1 parent ab27a33 commit 48b705c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example/gluon/lstm_crf/lstm_crf.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def _score_sentence(self, feats, tags_array):
self.transitions.data()[to_scalar(tags_array[idx+1]),
to_scalar(tags_array[idx])] + feat[to_scalar(tags_array[idx+1])]
score = score + self.transitions.data()[self.tag2idx[STOP_TAG],
to_scalar(tags.array[int(tags_array.shape[0]-1)])]
to_scalar(tags_array[int(tags_array.shape[0]-1)])]
return score

def _viterbi_decode(self, feats):
Expand Down

0 comments on commit 48b705c

Please sign in to comment.