You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mv example.train example.train.bak
head -2000 example.train.bak >> example.train
然后训练 python main.py --train=True --clean=True
报错:
Traceback (most recent call last):
File "main.py", line 219, in main
train()
File "main.py", line 145, in train
test_sentences, char_to_id, tag_to_id, FLAGS.lower
File "ChineseNER/loader.py", line 110, in prepare_dataset
tags = [tag_to_id[w[-1]] for w in s]
File "ChineseNER/loader.py", line 110, in <listcomp>
tags = [tag_to_id[w[-1]] for w in s]
KeyError: 'S-PER'
这是因为?
The text was updated successfully, but these errors were encountered:
smartcatdog
changed the title
取作者数据集中的前3000条训练数据为新的训练数据,验证及测试集数据不变,训练出错。
取作者全部数据集训练OK,但是取数据集中的前3000条训练数据为新的训练数据,验证及测试集数据不变,训练出错。
Sep 22, 2019
mv example.train example.train.bak
head -2000 example.train.bak >> example.train
然后训练 python main.py --train=True --clean=True
报错:
Traceback (most recent call last):
File "main.py", line 219, in main
train()
File "main.py", line 145, in train
test_sentences, char_to_id, tag_to_id, FLAGS.lower
File "ChineseNER/loader.py", line 110, in prepare_dataset
tags = [tag_to_id[w[-1]] for w in s]
File "ChineseNER/loader.py", line 110, in <listcomp>
tags = [tag_to_id[w[-1]] for w in s]
KeyError: 'S-PER'
执行
然后训练
python main.py --train=True --clean=True
报错:
这是因为?
The text was updated successfully, but these errors were encountered: