WuHuRestaurant/xf_event_extraction2020Top1

train

Closed this issue · 7 comments

train.sh模型找不到

运行时显示OSError: Model name './bert/torch_roberta_wwm' was not found in tokenizers model name list (bert-base-uncased, bert-large-uncased, bert-base-cased, bert-large-cased,...
是我模型没有下载对吗

这个文件夹里面你下的什么样子

非常感谢您的回复!
因为环境问题,我是使用google colab运行的 researchHub是项目的根目录,模型放在“/researchHub/BERT”文件夹下,在脚本中也改了相应BERT_dir。
并且在readme的“并将 vocab.txt 中的两个 unused 改成 [INV] 和 [BLANK](详见 processor 代码中的 fine_grade_tokenize)”这个部分,我发现vocab.txt里的内容是从[unused1]-[unused99],对此处如何改变存在一些疑问,如图:
image
image
image

或者是出现此问题,是模型解析有误吗?
image

把bert_config.json 改成config.json

感谢你的回复 问题已解决 config.json文件名已改,除此之外,对tokenizer = BertTokenizer.from_pretrained(model_name)和bert_model = BertModel.from_pretrained(MODEL_PATH)这两个函数的参数也进行了修改。

谢谢作者!!