KeyError: '[SEP]'
myf-algorithm opened this issue · comments
myf-algorithm commented
对HAN模型进行训练时,出现报错信息:File "/home1/mayifan/demo/text_classification/model/model.py", line 385, in
sep_index = [i for i, num in enumerate(doc_list) if num == self.word_embedding.stoi['[SEP]']]
KeyError: '[SEP]'
Shen Li commented
词向量里面没有[SEP]。
myf-algorithm commented
我下载的是Sogou News 搜狗新闻,里面Word + Character的词向量,里面为什么没有[SEP]啊。请问Sogou News 搜狗新闻那个里面有[SEP]
Shen Li commented
语料里面为什么会有[SEP]呢?