zjy-ucas / ChineseNER

A neural network model for Chinese named entity recognition
1.78k stars 568 forks source link

TypeError: slice indices must be integers or None or have an __index__ method #88

Open urextra opened 3 years ago

urextra commented 3 years ago

image 有人遇到吗

JiangTaoGZU commented 3 years ago

估计是你的tensorflow版本超前了,也有可能是windows的问题 1.修改data_utils.py 文件293行的内容为:batch_data.append(self.pad_data(sorted_data[int(ibatch_size) : int((i+1)batch_size)]))
2.若你出现utf8编码错误,修改conlleval.pywen.py文件第281行为 : with codecs.open(input_file, "r", "gbk") as f: