Traceback (most recent call last):
File ".\test.py", line 51, in
main("d:\test.csv", "models/best.pth.tar")
File ".\test.py", line 43, in main
model.load_state_dict(checkpoint["model"])
File "C:\Python\Python38\lib\site-packages\torch\nn\modules\module.py", line 1044, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for BertModelTest:
Missing key(s) in state_dict: "bert.bert.embeddings.position_ids".
Traceback (most recent call last): File ".\test.py", line 51, in
main("d:\test.csv", "models/best.pth.tar")
File ".\test.py", line 43, in main
model.load_state_dict(checkpoint["model"])
File "C:\Python\Python38\lib\site-packages\torch\nn\modules\module.py", line 1044, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for BertModelTest:
Missing key(s) in state_dict: "bert.bert.embeddings.position_ids".
如何解决?