From 8999fcae1a0e9ac0153e04b4fcdfcdf0558e7f3f Mon Sep 17 00:00:00 2001 From: Maoge Date: Thu, 2 May 2019 15:18:20 -0700 Subject: [PATCH] Update lstm_crf.py Fix the typo. --- example/gluon/lstm_crf/lstm_crf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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):