diff --git a/example/gluon/lstm_crf/lstm_crf.py b/example/gluon/lstm_crf/lstm_crf.py index 011dcfbc4aea..6cdc6e95a383 100644 --- a/example/gluon/lstm_crf/lstm_crf.py +++ b/example/gluon/lstm_crf/lstm_crf.py @@ -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):