Open lin-yu-lu opened 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'.
加载模型权重有问题。
这里报错要怎么办呀? 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'.