taishan1994 / SpERT_chinese

基于论文SpERT: "Span-based Entity and Relation Transformer"的中文关系抽取,同时抽取实体、实体类别和关系类别。
MIT License
31 stars 6 forks source link

_pickle.UnpicklingError: invalid load key, 'v'. #6

Open lin-yu-lu opened 10 months ago

lin-yu-lu commented 10 months ago

这里报错要怎么办呀? File "/Users/lyl/Desktop/postgraduate/一/NLP/SpERT_chinese-main/spert/util.py", line 218, in check_version state_dict = torch.load(model_path, map_location=torch.device('cpu')) File "/Library/Python/3.9/site-packages/torch/serialization.py", line 608, in load return _legacy_load(opened_file, map_location, pickle_module, pickle_load_args) File "/Library/Python/3.9/site-packages/torch/serialization.py", line 777, in _legacy_load magic_number = pickle_module.load(f, pickle_load_args) _pickle.UnpicklingError: invalid load key, 'v'.

taishan1994 commented 10 months ago

加载模型权重有问题。